From c47c043065b0b9138352729462a3e809eefc8265 Mon Sep 17 00:00:00 2001 From: Garrett Drapala Date: Mon, 16 Dec 2013 23:24:01 -0500 Subject: [PATCH] CLN: add diff to series/dataframe groupby dispatch whitelist --- pandas/core/groupby.py | 2 +- pandas/tests/test_groupby.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandas/core/groupby.py b/pandas/core/groupby.py index 46711e4917e4c..e8a9d6e49a066 100644 --- a/pandas/core/groupby.py +++ b/pandas/core/groupby.py @@ -68,7 +68,7 @@ 'shift', 'tshift', 'ffill', 'bfill', 'pct_change', 'skew', - 'corr', 'cov', + 'corr', 'cov', 'diff', ]) | _plotting_methods _series_apply_whitelist = \ diff --git a/pandas/tests/test_groupby.py b/pandas/tests/test_groupby.py index fef6a18acd7ff..942efdfc23740 100644 --- a/pandas/tests/test_groupby.py +++ b/pandas/tests/test_groupby.py @@ -3270,6 +3270,7 @@ def test_groupby_whitelist(self): 'plot', 'boxplot', 'hist', 'median', 'dtypes', 'corrwith', 'corr', 'cov', + 'diff', ]) s_whitelist = frozenset([ 'last', 'first', @@ -3290,6 +3291,7 @@ def test_groupby_whitelist(self): 'median', 'dtype', 'corr', 'cov', 'value_counts', + 'diff', ]) for obj, whitelist in zip((df, s), @@ -3411,7 +3413,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', + 'cov', 'dtypes', 'diff', ]) self.assertEqual(results, expected)