DataFrameGroupBy.
boxplot
Make box plots from DataFrameGroupBy data.
False - no subplots will be used
False
True - create a subplot for each group.
True
Can be any valid input to groupby.
The layout of the plot: (rows, columns).
Whether x-axes will be shared among subplots.
New in version 0.23.1.
Whether y-axes will be shared among subplots.
Backend to use instead of the backend specified in the option plotting.backend. For instance, ‘matplotlib’. Alternatively, to specify the plotting.backend for the whole session, set pd.options.plotting.backend.
plotting.backend
pd.options.plotting.backend
New in version 1.0.0.
All other plotting keyword arguments to be passed to matplotlib’s boxplot function.
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)