1818 Categorical ,
1919 CategoricalDtype ,
2020 DataFrame ,
21+ DatetimeIndex ,
2122 Index ,
23+ PeriodIndex ,
24+ RangeIndex ,
2225 Series ,
2326 Timestamp ,
2427 date_range ,
@@ -598,7 +601,7 @@ def test_sem(self, datetime_frame):
598601 "C" : [1.0 ],
599602 "D" : ["a" ],
600603 "E" : Categorical (["a" ], categories = ["a" ]),
601- "F" : pd . DatetimeIndex (["2000-01-02" ], dtype = "M8[ns]" ),
604+ "F" : DatetimeIndex (["2000-01-02" ], dtype = "M8[ns]" ),
602605 "G" : to_timedelta (["1 days" ]),
603606 },
604607 ),
@@ -610,7 +613,7 @@ def test_sem(self, datetime_frame):
610613 "C" : [np .nan ],
611614 "D" : np .array ([np .nan ], dtype = object ),
612615 "E" : Categorical ([np .nan ], categories = ["a" ]),
613- "F" : pd . DatetimeIndex ([pd .NaT ], dtype = "M8[ns]" ),
616+ "F" : DatetimeIndex ([pd .NaT ], dtype = "M8[ns]" ),
614617 "G" : to_timedelta ([pd .NaT ]),
615618 },
616619 ),
@@ -621,7 +624,7 @@ def test_sem(self, datetime_frame):
621624 "I" : [8 , 9 , np .nan , np .nan ],
622625 "J" : [1 , np .nan , np .nan , np .nan ],
623626 "K" : Categorical (["a" , np .nan , np .nan , np .nan ], categories = ["a" ]),
624- "L" : pd . DatetimeIndex (
627+ "L" : DatetimeIndex (
625628 ["2000-01-02" , "NaT" , "NaT" , "NaT" ], dtype = "M8[ns]"
626629 ),
627630 "M" : to_timedelta (["1 days" , "nan" , "nan" , "nan" ]),
@@ -635,7 +638,7 @@ def test_sem(self, datetime_frame):
635638 "I" : [8 , 9 , np .nan , np .nan ],
636639 "J" : [1 , np .nan , np .nan , np .nan ],
637640 "K" : Categorical ([np .nan , "a" , np .nan , np .nan ], categories = ["a" ]),
638- "L" : pd . DatetimeIndex (
641+ "L" : DatetimeIndex (
639642 ["NaT" , "2000-01-02" , "NaT" , "NaT" ], dtype = "M8[ns]"
640643 ),
641644 "M" : to_timedelta (["nan" , "1 days" , "nan" , "nan" ]),
@@ -652,15 +655,13 @@ def test_mode_dropna(self, dropna, expected):
652655 "C" : [1 , np .nan , np .nan , np .nan ],
653656 "D" : [np .nan , np .nan , "a" , np .nan ],
654657 "E" : Categorical ([np .nan , np .nan , "a" , np .nan ]),
655- "F" : pd .DatetimeIndex (
656- ["NaT" , "2000-01-02" , "NaT" , "NaT" ], dtype = "M8[ns]"
657- ),
658+ "F" : DatetimeIndex (["NaT" , "2000-01-02" , "NaT" , "NaT" ], dtype = "M8[ns]" ),
658659 "G" : to_timedelta (["1 days" , "nan" , "nan" , "nan" ]),
659660 "H" : [8 , 8 , 9 , 9 ],
660661 "I" : [9 , 9 , 8 , 8 ],
661662 "J" : [1 , 1 , np .nan , np .nan ],
662663 "K" : Categorical (["a" , np .nan , "a" , np .nan ]),
663- "L" : pd . DatetimeIndex (
664+ "L" : DatetimeIndex (
664665 ["2000-01-02" , "2000-01-02" , "NaT" , "NaT" ], dtype = "M8[ns]"
665666 ),
666667 "M" : to_timedelta (["1 days" , "nan" , "1 days" , "nan" ]),
@@ -831,15 +832,15 @@ def test_sum_corner(self):
831832 @pytest .mark .parametrize (
832833 "index" ,
833834 [
834- tm . makeRangeIndex (0 ),
835- tm . makeDateIndex ( 0 ),
836- tm . makeNumericIndex ( 0 , dtype = int ),
837- tm . makeNumericIndex ( 0 , dtype = float ),
838- tm . makeDateIndex ( 0 , freq = "ME" ),
839- tm . makePeriodIndex ( 0 ),
835+ RangeIndex (0 ),
836+ DatetimeIndex ([] ),
837+ Index ([] , dtype = np . int64 ),
838+ Index ([] , dtype = np . float64 ),
839+ DatetimeIndex ([] , freq = "ME" ),
840+ PeriodIndex ([], freq = "D" ),
840841 ],
841842 )
842- def test_axis_1_empty (self , all_reductions , index , using_array_manager ):
843+ def test_axis_1_empty (self , all_reductions , index ):
843844 df = DataFrame (columns = ["a" ], index = index )
844845 result = getattr (df , all_reductions )(axis = 1 )
845846 if all_reductions in ("any" , "all" ):
0 commit comments