@@ -614,12 +614,12 @@ def test_list_grouper_with_nat(self):
614614
615615 # Grouper in a list grouping
616616 result = df .groupby ([grouper ])
617- expected = {pd . Timestamp ("2011-01-01" ): Index (list (range (364 )))}
617+ expected = {Timestamp ("2011-01-01" ): Index (list (range (364 )))}
618618 tm .assert_dict_equal (result .groups , expected )
619619
620620 # Test case without a list
621621 result = df .groupby (grouper )
622- expected = {pd . Timestamp ("2011-01-01" ): 365 }
622+ expected = {Timestamp ("2011-01-01" ): 365 }
623623 tm .assert_dict_equal (result .groups , expected )
624624
625625 @pytest .mark .parametrize (
@@ -938,12 +938,12 @@ def test_groupby_with_small_elem(self):
938938 grouped = df .groupby ([pd .Grouper (freq = "M" ), "event" ])
939939 assert len (grouped .groups ) == 2
940940 assert grouped .ngroups == 2
941- assert (pd . Timestamp ("2014-09-30" ), "start" ) in grouped .groups
942- assert (pd . Timestamp ("2013-10-31" ), "start" ) in grouped .groups
941+ assert (Timestamp ("2014-09-30" ), "start" ) in grouped .groups
942+ assert (Timestamp ("2013-10-31" ), "start" ) in grouped .groups
943943
944- res = grouped .get_group ((pd . Timestamp ("2014-09-30" ), "start" ))
944+ res = grouped .get_group ((Timestamp ("2014-09-30" ), "start" ))
945945 tm .assert_frame_equal (res , df .iloc [[0 ], :])
946- res = grouped .get_group ((pd . Timestamp ("2013-10-31" ), "start" ))
946+ res = grouped .get_group ((Timestamp ("2013-10-31" ), "start" ))
947947 tm .assert_frame_equal (res , df .iloc [[1 ], :])
948948
949949 df = DataFrame (
@@ -953,12 +953,12 @@ def test_groupby_with_small_elem(self):
953953 grouped = df .groupby ([pd .Grouper (freq = "M" ), "event" ])
954954 assert len (grouped .groups ) == 2
955955 assert grouped .ngroups == 2
956- assert (pd . Timestamp ("2014-09-30" ), "start" ) in grouped .groups
957- assert (pd . Timestamp ("2013-10-31" ), "start" ) in grouped .groups
956+ assert (Timestamp ("2014-09-30" ), "start" ) in grouped .groups
957+ assert (Timestamp ("2013-10-31" ), "start" ) in grouped .groups
958958
959- res = grouped .get_group ((pd . Timestamp ("2014-09-30" ), "start" ))
959+ res = grouped .get_group ((Timestamp ("2014-09-30" ), "start" ))
960960 tm .assert_frame_equal (res , df .iloc [[0 , 2 ], :])
961- res = grouped .get_group ((pd . Timestamp ("2013-10-31" ), "start" ))
961+ res = grouped .get_group ((Timestamp ("2013-10-31" ), "start" ))
962962 tm .assert_frame_equal (res , df .iloc [[1 ], :])
963963
964964 # length=3
@@ -969,15 +969,15 @@ def test_groupby_with_small_elem(self):
969969 grouped = df .groupby ([pd .Grouper (freq = "M" ), "event" ])
970970 assert len (grouped .groups ) == 3
971971 assert grouped .ngroups == 3
972- assert (pd . Timestamp ("2014-09-30" ), "start" ) in grouped .groups
973- assert (pd . Timestamp ("2013-10-31" ), "start" ) in grouped .groups
974- assert (pd . Timestamp ("2014-08-31" ), "start" ) in grouped .groups
972+ assert (Timestamp ("2014-09-30" ), "start" ) in grouped .groups
973+ assert (Timestamp ("2013-10-31" ), "start" ) in grouped .groups
974+ assert (Timestamp ("2014-08-31" ), "start" ) in grouped .groups
975975
976- res = grouped .get_group ((pd . Timestamp ("2014-09-30" ), "start" ))
976+ res = grouped .get_group ((Timestamp ("2014-09-30" ), "start" ))
977977 tm .assert_frame_equal (res , df .iloc [[0 ], :])
978- res = grouped .get_group ((pd . Timestamp ("2013-10-31" ), "start" ))
978+ res = grouped .get_group ((Timestamp ("2013-10-31" ), "start" ))
979979 tm .assert_frame_equal (res , df .iloc [[1 ], :])
980- res = grouped .get_group ((pd . Timestamp ("2014-08-31" ), "start" ))
980+ res = grouped .get_group ((Timestamp ("2014-08-31" ), "start" ))
981981 tm .assert_frame_equal (res , df .iloc [[2 ], :])
982982
983983 def test_grouping_string_repr (self ):
0 commit comments