@@ -403,6 +403,15 @@ def test_concat_args() -> None:
403403 pd .DataFrame ,
404404 )
405405
406+ if TYPE_CHECKING_INVALID_USAGE :
407+
408+ def _cannot_pass_ignore_index_eq_true_and_keys () -> ( # pyright: ignore[reportUnusedFunction]
409+ None
410+ ):
411+ assert_type (
412+ pd .concat ([df , df2 ], ignore_index = True , keys = ["df1" , "df2" ]), Never
413+ )
414+
406415
407416def test_frame_subclass_concat () -> None :
408417 """Test concatenate subclass of DataFrame GH1396."""
@@ -445,13 +454,37 @@ def test_types_json_normalize() -> None:
445454 ),
446455 pd .DataFrame ,
447456 )
457+
458+ # iterable case
459+ check (
460+ assert_type (pd .json_normalize (data = (dic for dic in data1 )), pd .DataFrame ),
461+ pd .DataFrame ,
462+ )
463+
448464 data2 : dict [str , Any ] = {"name" : {"given" : "Mose" , "family" : "Regner" }}
449465 check (
450466 assert_type (data2 , dict [str , Any ]),
451467 dict ,
452468 )
453469 check (assert_type (pd .json_normalize (data = data2 ), pd .DataFrame ), pd .DataFrame )
454470
471+ # series case
472+ data = [
473+ {
474+ "id" : 1 ,
475+ "name" : "Cole Volk" ,
476+ "fitness" : {"height" : 130 , "weight" : 60 },
477+ },
478+ {"name" : "Mark Reg" , "fitness" : {"height" : 130 , "weight" : 60 }},
479+ {
480+ "id" : 2 ,
481+ "name" : "Faye Raker" ,
482+ "fitness" : {"height" : 130 , "weight" : 60 },
483+ },
484+ ]
485+ series = pd .Series (data , index = pd .Index (["a" , "b" , "c" ]))
486+ check (assert_type (pd .json_normalize (series ), pd .DataFrame ), pd .DataFrame )
487+
455488
456489def test_isna () -> None :
457490 # https://github.com/pandas-dev/pandas-stubs/issues/264
@@ -2128,6 +2161,24 @@ def g(x: pd.Series) -> int:
21282161 index = idx ,
21292162 )
21302163
2164+ df = pd .DataFrame (
2165+ {
2166+ "A" : ["good" , "bad" , "good" , "bad" , "good" ],
2167+ "B" : ["one" , "two" , "one" , "three" , "two" ],
2168+ "X" : [2 , 5 , 4 , 20 , 10 ],
2169+ }
2170+ )
2171+
2172+ check (
2173+ assert_type (
2174+ pd .pivot_table (
2175+ df , index = "A" , columns = "B" , values = "X" , aggfunc = "std" , ddof = 2
2176+ ),
2177+ pd .DataFrame ,
2178+ ),
2179+ pd .DataFrame ,
2180+ )
2181+
21312182
21322183def test_pivot_table_aggfunc_string_reduction (sample_df : pd .DataFrame ) -> None :
21332184 """Test string aggfunc with reduction functions from ReductionKernelType."""
0 commit comments