Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas-stubs/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
data: (
Scalar
| _ListLike
| dict[HashableT1, Any]
| Mapping[HashableT1, Any]
| BaseGroupBy
| NaTType
| NAType
Expand Down
12 changes: 12 additions & 0 deletions tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -3490,3 +3490,15 @@ def test_info() -> None:
check(assert_type(df.info(show_counts=True), None), type(None))
check(assert_type(df.info(show_counts=False), None), type(None))
check(assert_type(df.info(show_counts=None), None), type(None))


def test_series_typed_dict() -> None:
"""Test that no error is raised when constructing a series from a typed dict."""

class MyDict(TypedDict):
a: str
b: str

my_dict = MyDict(a="", b="")
sr = pd.Series(my_dict)
check(assert_type(sr, pd.Series), pd.Series)
Loading