Skip to content

Commit c47c043

Browse files
committed
CLN: add diff to series/dataframe groupby dispatch whitelist
1 parent 66934c2 commit c47c043

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pandas/core/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
'shift', 'tshift',
6969
'ffill', 'bfill',
7070
'pct_change', 'skew',
71-
'corr', 'cov',
71+
'corr', 'cov', 'diff',
7272
]) | _plotting_methods
7373

7474
_series_apply_whitelist = \

pandas/tests/test_groupby.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -3270,6 +3270,7 @@ def test_groupby_whitelist(self):
32703270
'plot', 'boxplot', 'hist',
32713271
'median', 'dtypes',
32723272
'corrwith', 'corr', 'cov',
3273+
'diff',
32733274
])
32743275
s_whitelist = frozenset([
32753276
'last', 'first',
@@ -3290,6 +3291,7 @@ def test_groupby_whitelist(self):
32903291
'median', 'dtype',
32913292
'corr', 'cov',
32923293
'value_counts',
3294+
'diff',
32933295
])
32943296

32953297
for obj, whitelist in zip((df, s),
@@ -3411,7 +3413,7 @@ def test_tab_completion(self):
34113413
'resample', 'cummin', 'fillna', 'cumsum', 'cumcount',
34123414
'all', 'shift', 'skew', 'bfill', 'irow', 'ffill',
34133415
'take', 'tshift', 'pct_change', 'any', 'mad', 'corr', 'corrwith',
3414-
'cov', 'dtypes',
3416+
'cov', 'dtypes', 'diff',
34153417
])
34163418
self.assertEqual(results, expected)
34173419

0 commit comments

Comments
 (0)