File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1156,3 +1156,29 @@ def test_boolean_order_of_operations_with_parens():
11561156 ].reset_index (drop = True )
11571157
11581158 tm .assert_frame_equal (pandas_frame , my_frame )
1159+
1160+
1161+ def test_count ():
1162+ """
1163+ Test count star
1164+ :return:
1165+ """
1166+ my_frame = query ("select count(day) from forest_fires" )
1167+ pandas_frame = FOREST_FIRES .copy ()
1168+ pandas_frame = (
1169+ pandas_frame [["month" ]].count ().to_frame ("_col0" ).reset_index (drop = True )
1170+ )
1171+ tm .assert_frame_equal (pandas_frame , my_frame )
1172+
1173+
1174+ def test_count_star ():
1175+ """
1176+ Test the count aggregation
1177+ :return:
1178+ """
1179+ my_frame = query ("select count(*) from forest_fires" )
1180+ pandas_frame = FOREST_FIRES .copy ()
1181+ pandas_frame = (
1182+ pandas_frame [["month" ]].count ().to_frame ("_col0" ).reset_index (drop = True )
1183+ )
1184+ tm .assert_frame_equal (pandas_frame , my_frame )
You can’t perform that action at this time.
0 commit comments