From 28a4e1a66c3cf966d863688693f86f5085abdb50 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Sun, 29 Dec 2013 00:19:51 +0100 Subject: [PATCH] Add idxmax/idxmin to groupby dispatch whitelist (#5786) --- pandas/core/groupby.py | 1 + pandas/tests/test_groupby.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/core/groupby.py b/pandas/core/groupby.py index e8a9d6e49a066..182f75e53ca5d 100644 --- a/pandas/core/groupby.py +++ b/pandas/core/groupby.py @@ -65,6 +65,7 @@ 'mad', 'any', 'all', 'irow', 'take', + 'idxmax', 'idxmin', 'shift', 'tshift', 'ffill', 'bfill', 'pct_change', 'skew', diff --git a/pandas/tests/test_groupby.py b/pandas/tests/test_groupby.py index 942efdfc23740..7e54aa4e0813f 100644 --- a/pandas/tests/test_groupby.py +++ b/pandas/tests/test_groupby.py @@ -3264,6 +3264,7 @@ def test_groupby_whitelist(self): 'mad', 'any', 'all', 'irow', 'take', + 'idxmax', 'idxmin', 'shift', 'tshift', 'ffill', 'bfill', 'pct_change', 'skew', @@ -3284,6 +3285,7 @@ def test_groupby_whitelist(self): 'mad', 'any', 'all', 'irow', 'take', + 'idxmax', 'idxmin', 'shift', 'tshift', 'ffill', 'bfill', 'pct_change', 'skew', @@ -3413,7 +3415,7 @@ def test_tab_completion(self): 'resample', 'cummin', 'fillna', 'cumsum', 'cumcount', 'all', 'shift', 'skew', 'bfill', 'irow', 'ffill', 'take', 'tshift', 'pct_change', 'any', 'mad', 'corr', 'corrwith', - 'cov', 'dtypes', 'diff', + 'cov', 'dtypes', 'diff', 'idxmax', 'idxmin' ]) self.assertEqual(results, expected)