pandas.DataFrame.plot.box
pandas 3.1.1 · DataFrame · method
Draw box plots to compare medians, quartiles and spread.
Call syntax
DataFrame.plot.box(by=None, **kwargs)Inspect the call
Run this code to inspect the callable and its parameters. Its data, backend, or environment is needed to execute the operation itself.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
by |
Optional Positional or keyword Default None |
str or sequence Specify the labels, mapping, or values that determine the sort or grouping. |
**kwargs |
Optional Additional keyword arguments |
Returns
matplotlib.axes.Axes or Series of them
Example for a local Python session
import pandas as pd
import matplotlib
frame = pd.DataFrame({"units": [2., 5., 7.], "price": [4., 3., 2.]})
print(frame.plot.box())