Skip to content

Commit 7d0893a

Browse files
author
Matt Hagy
committed
Test renaming of _groupby_function wrapper function
1 parent 8b166ff commit 7d0893a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/test_groupby.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6093,6 +6093,12 @@ def test_tab_completion(self):
60936093
'ffill', 'bfill', 'pad', 'backfill', 'rolling', 'expanding'])
60946094
self.assertEqual(results, expected)
60956095

6096+
def test_groupby_function_rename(self):
6097+
grp = self.mframe.groupby(level='second')
6098+
for name in ['sum', 'prod', 'min', 'max', 'first', 'last']:
6099+
f = getattr(grp, name)
6100+
self.assertEqual(f.__name__, name)
6101+
60966102
def test_lexsort_indexer(self):
60976103
keys = [[nan] * 5 + list(range(100)) + [nan] * 5]
60986104
# orders=True, na_position='last'

0 commit comments

Comments
 (0)