Additional migration issues for the pd.Series constructor involve passing a dictionary. It fails with a Timestamp or multi-index key whereas before it did not:
sr1 = pd.Series(
{
pd.Timestamp(2023, 1, 2): "b",
}
)
sr2 = pd.Series(
{
("a", "b"): "c",
}
)
test.py:172: error: Need type annotation for "sr1" [var-annotated]
test.py:174: error: Dict entry 0 has incompatible type "Timestamp": "str"; expected "str": "ndarray[Any, Any]" [dict-item]
test.py:178: error: Need type annotation for "sr2" [var-annotated]
test.py:180: error: Dict entry 0 has incompatible type "Tuple[str, str]": "str"; expected "str": "ndarray[Any, Any]" [dict-item]
Originally posted by @amgcc in #826 (comment)
Might be best to allow Hashable as the dict key.