@@ -4415,6 +4415,26 @@ def test_regression_whitelist_methods(self) :
4415
4415
expected = getattr (frame ,op )(level = level ,axis = axis )
4416
4416
assert_frame_equal (result , expected )
4417
4417
4418
+ def test_regression_kwargs_whitelist_methods (self ):
4419
+ # GH8733
4420
+
4421
+ index = MultiIndex (levels = [['foo' , 'bar' , 'baz' , 'qux' ],
4422
+ ['one' , 'two' , 'three' ]],
4423
+ labels = [[0 , 0 , 0 , 1 , 1 , 2 , 2 , 3 , 3 , 3 ],
4424
+ [0 , 1 , 2 , 0 , 1 , 1 , 2 , 0 , 1 , 2 ]],
4425
+ names = ['first' , 'second' ])
4426
+ raw_frame = DataFrame (np .random .randn (10 , 3 ), index = index ,
4427
+ columns = Index (['A' , 'B' , 'C' ], name = 'exp' ))
4428
+
4429
+ grouped = raw_frame .groupby (level = 0 , axis = 1 )
4430
+ grouped .all (test_kwargs = 'Test kwargs' )
4431
+ grouped .any (test_kwargs = 'Test kwargs' )
4432
+ grouped .cumcount (test_kwargs = 'Test kwargs' )
4433
+ grouped .mad (test_kwargs = 'Test kwargs' )
4434
+ grouped .cummin (test_kwargs = 'Test kwargs' )
4435
+ grouped .skew (test_kwargs = 'Test kwargs' )
4436
+ grouped .cumprod (test_kwargs = 'Test kwargs' )
4437
+
4418
4438
def test_groupby_blacklist (self ):
4419
4439
from string import ascii_lowercase
4420
4440
letters = np .array (list (ascii_lowercase ))
@@ -4460,6 +4480,9 @@ def test_series_groupby_plotting_nominally_works(self):
4460
4480
tm .close ()
4461
4481
height .groupby (gender ).hist ()
4462
4482
tm .close ()
4483
+ #Regression test for GH8733
4484
+ height .groupby (gender ).plot (alpha = 0.5 )
4485
+ tm .close ()
4463
4486
4464
4487
def test_plotting_with_float_index_works (self ):
4465
4488
_skip_if_mpl_not_installed ()
0 commit comments