Skip to content

Commit 2a54b77

Browse files
Matt Hagyjreback
Matt Hagy
authored andcommitted
Test renaming of _groupby_function wrapper function
1 parent a492b5a commit 2a54b77

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/groupby/test_groupby.py

+6
Original file line numberDiff line numberDiff line change
@@ -3929,6 +3929,12 @@ def test_tab_completion(self):
39293929
'ffill', 'bfill', 'pad', 'backfill', 'rolling', 'expanding'])
39303930
self.assertEqual(results, expected)
39313931

3932+
def test_groupby_function_rename(self):
3933+
grp = self.mframe.groupby(level='second')
3934+
for name in ['sum', 'prod', 'min', 'max', 'first', 'last']:
3935+
f = getattr(grp, name)
3936+
self.assertEqual(f.__name__, name)
3937+
39323938
def test_lower_int_prec_count(self):
39333939
df = DataFrame({'a': np.array(
39343940
[0, 1, 2, 100], np.int8),

0 commit comments

Comments
 (0)