File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1195,7 +1195,7 @@ def _groupby_values(
1195
1195
get_column_right ,
1196
1196
) = block .join (key ._block , how = "inner" if dropna else "left" )
1197
1197
1198
- value_col = get_column_left [self . _value_column ]
1198
+ value_col = get_column_left [value_col ]
1199
1199
grouping_cols = [
1200
1200
* [get_column_left [value ] for value in grouping_cols ],
1201
1201
get_column_right [key ._value_column ],
Original file line number Diff line number Diff line change @@ -1313,9 +1313,15 @@ def test_any(scalars_dfs):
1313
1313
def test_groupby_sum (scalars_dfs ):
1314
1314
scalars_df , scalars_pandas_df = scalars_dfs
1315
1315
col_name = "int64_too"
1316
- bf_series = scalars_df [col_name ].groupby (scalars_df ["string_col" ]).sum ()
1316
+ bf_series = (
1317
+ scalars_df [col_name ]
1318
+ .groupby ([scalars_df ["bool_col" ], ~ scalars_df ["bool_col" ]])
1319
+ .sum ()
1320
+ )
1317
1321
pd_series = (
1318
- scalars_pandas_df [col_name ].groupby (scalars_pandas_df ["string_col" ]).sum ()
1322
+ scalars_pandas_df [col_name ]
1323
+ .groupby ([scalars_pandas_df ["bool_col" ], ~ scalars_pandas_df ["bool_col" ]])
1324
+ .sum ()
1319
1325
)
1320
1326
# TODO(swast): Update groupby to use index based on group by key(s).
1321
1327
bf_result = bf_series .to_pandas ()
You can’t perform that action at this time.
0 commit comments