Skip to content

Commit 28a4e1a

Browse files
Add idxmax/idxmin to groupby dispatch whitelist (#5786)
1 parent 12eb775 commit 28a4e1a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pandas/core/groupby.py

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
'mad',
6666
'any', 'all',
6767
'irow', 'take',
68+
'idxmax', 'idxmin',
6869
'shift', 'tshift',
6970
'ffill', 'bfill',
7071
'pct_change', 'skew',

pandas/tests/test_groupby.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3264,6 +3264,7 @@ def test_groupby_whitelist(self):
32643264
'mad',
32653265
'any', 'all',
32663266
'irow', 'take',
3267+
'idxmax', 'idxmin',
32673268
'shift', 'tshift',
32683269
'ffill', 'bfill',
32693270
'pct_change', 'skew',
@@ -3284,6 +3285,7 @@ def test_groupby_whitelist(self):
32843285
'mad',
32853286
'any', 'all',
32863287
'irow', 'take',
3288+
'idxmax', 'idxmin',
32873289
'shift', 'tshift',
32883290
'ffill', 'bfill',
32893291
'pct_change', 'skew',
@@ -3413,7 +3415,7 @@ def test_tab_completion(self):
34133415
'resample', 'cummin', 'fillna', 'cumsum', 'cumcount',
34143416
'all', 'shift', 'skew', 'bfill', 'irow', 'ffill',
34153417
'take', 'tshift', 'pct_change', 'any', 'mad', 'corr', 'corrwith',
3416-
'cov', 'dtypes', 'diff',
3418+
'cov', 'dtypes', 'diff', 'idxmax', 'idxmin'
34173419
])
34183420
self.assertEqual(results, expected)
34193421

0 commit comments

Comments
 (0)