@@ -644,13 +644,12 @@ def test_resample_dup_index():
644
644
warning_msg = "DataFrame.resample with axis=1 is deprecated."
645
645
with tm .assert_produces_warning (FutureWarning , match = warning_msg ):
646
646
result = df .resample ("Q" , axis = 1 ).mean ()
647
- msg = "DataFrame.groupby with axis=1 is deprecated"
648
- with tm .assert_produces_warning (FutureWarning , match = msg ):
649
- expected = df .groupby (lambda x : int ((x .month - 1 ) / 3 ), axis = 1 ).mean ()
650
- expected .columns = [
651
- Period (year = 2000 , quarter = i + 1 , freq = "Q" ) for i in range (4 )
652
- ]
653
- tm .assert_frame_equal (result , expected )
647
+
648
+ msg = "DataFrame.groupby with axis=1 is deprecated"
649
+ with tm .assert_produces_warning (FutureWarning , match = msg ):
650
+ expected = df .groupby (lambda x : int ((x .month - 1 ) / 3 ), axis = 1 ).mean ()
651
+ expected .columns = [Period (year = 2000 , quarter = i + 1 , freq = "Q" ) for i in range (4 )]
652
+ tm .assert_frame_equal (result , expected )
654
653
655
654
656
655
def test_resample_reresample (unit ):
@@ -736,8 +735,8 @@ def test_resample_axis1(unit):
736
735
warning_msg = "DataFrame.resample with axis=1 is deprecated."
737
736
with tm .assert_produces_warning (FutureWarning , match = warning_msg ):
738
737
result = df .resample ("M" , axis = 1 ).mean ()
739
- expected = df .T .resample ("M" ).mean ().T
740
- tm .assert_frame_equal (result , expected )
738
+ expected = df .T .resample ("M" ).mean ().T
739
+ tm .assert_frame_equal (result , expected )
741
740
742
741
743
742
@pytest .mark .parametrize ("freq" , ["t" , "5t" , "15t" , "30t" , "4h" , "12h" ])
0 commit comments