@@ -4415,6 +4415,26 @@ def test_regression_whitelist_methods(self) :
44154415 expected = getattr (frame ,op )(level = level ,axis = axis )
44164416 assert_frame_equal (result , expected )
44174417
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+
44184438 def test_groupby_blacklist (self ):
44194439 from string import ascii_lowercase
44204440 letters = np .array (list (ascii_lowercase ))
@@ -4460,6 +4480,9 @@ def test_series_groupby_plotting_nominally_works(self):
44604480 tm .close ()
44614481 height .groupby (gender ).hist ()
44624482 tm .close ()
4483+ #Regression test for GH8733
4484+ height .groupby (gender ).plot (alpha = 0.5 )
4485+ tm .close ()
44634486
44644487 def test_plotting_with_float_index_works (self ):
44654488 _skip_if_mpl_not_installed ()
0 commit comments