Skip to content

Commit f3d880d

Browse files
author
Matt Hagy
committed
Test renaming of _groupby_function wrapper function
1 parent 8914bef commit f3d880d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/groupby/test_groupby.py

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

5323+
def test_groupby_function_rename(self):
5324+
grp = self.mframe.groupby(level='second')
5325+
for name in ['sum', 'prod', 'min', 'max', 'first', 'last']:
5326+
f = getattr(grp, name)
5327+
self.assertEqual(f.__name__, name)
5328+
53235329
def test_lexsort_indexer(self):
53245330
keys = [[nan] * 5 + list(range(100)) + [nan] * 5]
53255331
# orders=True, na_position='last'

0 commit comments

Comments
 (0)