def boxplot_frame_groupby(grouped, subplots=True, column=None, fontsize=None,<EOL>rot=<NUM_LIT:0>, grid=True, ax=None, figsize=None,<EOL>layout=None, sharex=False, sharey=True, **kwds):
_raise_if_no_mpl()<EOL>_converter._WARN = False<EOL>if subplots is True:<EOL><INDENT>naxes = len(grouped)<EOL>fig, axes = _subplots(naxes=naxes, squeeze=False,<EOL>ax=ax, sharex=sharex, sharey=sharey,<EOL>figsize=figsize, layout=layout)<EOL>axes = _flatten(axes)<EOL>from pandas.core.series import Series<EOL>ret = Series()<EOL>for (key, group), ax in zip(grouped, axes):<EOL><INDENT>d = group.boxplot(ax=ax, column=column, fontsize=fontsize,<EOL>rot=rot, grid=grid, **kwds)<EOL>ax.set_title(pprint_thing(key))<EOL>ret.loc[key] = d<EOL><DEDENT>fig.subplots_adjust(bottom=<NUM_LIT>, top=<NUM_LIT>, left=<NUM_LIT:0.1>,<EOL>right=<NUM_LIT>, wspace=<NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>from pandas.core.reshape.concat import concat<EOL>keys, frames = zip(*grouped)<EOL>if grouped.axis == <NUM_LIT:0>:<EOL><INDENT>df = concat(frames, keys=keys, axis=<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>if len(frames) > <NUM_LIT:1>:<EOL><INDENT>df = frames[<NUM_LIT:0>].join(frames[<NUM_LIT:1>::])<EOL><DEDENT>else:<EOL><INDENT>df = frames[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>ret = df.boxplot(column=column, fontsize=fontsize, rot=rot,<EOL>grid=grid, ax=ax, figsize=figsize,<EOL>layout=layout, **kwds)<EOL><DEDENT>return ret<EOL>
Make box plots from DataFrameGroupBy data.

Parameters
----------
grouped : Grouped DataFrame
subplots : bool
    * ``False`` - no subplots will be used
    * ``True`` - create a subplot for each group
column : column name or list of names, or vector
    Can be any valid input to groupby
fontsize : int or string
rot : label rotation angle
grid : Setting this to True will show the grid
ax : Matplotlib axis object, default None
figsize : A tuple (width, height) in inches
layout : tuple (optional)
    (rows, columns) for the layout of the plot
sharex : bool, default False
    Whether x-axes will be shared among subplots

    .. versionadded:: 0.23.1
sharey : bool, default True
    Whether y-axes will be shared among subplots

    .. versionadded:: 0.23.1
`**kwds` : Keyword Arguments
    All other plotting keyword arguments to be passed to
    matplotlib's boxplot function

Returns
-------
dict of key/value = group key/DataFrame.boxplot return value
or DataFrame.boxplot return value in case subplots=figures=False

Examples
--------
>>> import itertools
>>> tuples = [t for t in itertools.product(range(1000), range(4))]
>>> index = pd.MultiIndex.from_tuples(tuples, names=['lvl0', 'lvl1'])
>>> data = np.random.randn(len(index),4)
>>> df = pd.DataFrame(data, columns=list('ABCD'), index=index)
>>>
>>> grouped = df.groupby(level='lvl1')
>>> boxplot_frame_groupby(grouped)
>>>
>>> grouped = df.unstack(level='lvl1').groupby(level=0, axis=1)
>>> boxplot_frame_groupby(grouped, subplots=False)