File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -334,7 +334,7 @@ class Series(IndexOpsMixin[S1], NDFrame):
334334 data : (
335335 Scalar
336336 | _ListLike
337- | dict [HashableT1 , Any ]
337+ | Mapping [HashableT1 , Any ]
338338 | BaseGroupBy
339339 | NaTType
340340 | NAType
Original file line number Diff line number Diff line change @@ -3490,3 +3490,15 @@ def test_info() -> None:
34903490 check (assert_type (df .info (show_counts = True ), None ), type (None ))
34913491 check (assert_type (df .info (show_counts = False ), None ), type (None ))
34923492 check (assert_type (df .info (show_counts = None ), None ), type (None ))
3493+
3494+
3495+ def test_series_typed_dict () -> None :
3496+ """Test that no error is raised when constructing a series from a typed dict."""
3497+
3498+ class MyDict (TypedDict ):
3499+ a : str
3500+ b : str
3501+
3502+ my_dict = MyDict (a = "" , b = "" )
3503+ sr = pd .Series (my_dict )
3504+ check (assert_type (sr , pd .Series ), pd .Series )
You can’t perform that action at this time.
0 commit comments