pandas.api.typing.SeriesGroupBy.hist
pandas 3.1.1 · GroupBy · method
Draw histograms to show how numeric observations are distributed across bins.
Call syntax
pd.api.typing.SeriesGroupBy.hist(…) Full signature
pd.api.typing.SeriesGroupBy.hist(
by=None,
ax=None,
grid=True,
xlabelsize=None,
xrot=None,
ylabelsize=None,
yrot=None,
figsize=None,
bins=10,
backend=None,
legend=False,
**kwargs,
)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
by |
Optional Positional or keyword Default None |
object Specify the labels, mapping, or values that determine the sort or grouping. |
ax |
Optional Positional or keyword Default None |
matplotlib.axes.Axes Provide the existing Matplotlib axes on which to draw. |
grid |
Optional Positional or keyword Default True |
bool Choose whether the plot displays grid lines. |
xlabelsize |
Optional Positional or keyword Default None |
int Set the size of horizontal-axis tick labels. |
xrot |
Optional Positional or keyword Default None |
float |
ylabelsize |
Optional Positional or keyword Default None |
int Set the size of vertical-axis tick labels. |
yrot |
Optional Positional or keyword Default None |
float |
figsize |
Optional Positional or keyword Default None |
tuple Set the figure width and height as a pair, in inches. |
bins |
Optional Positional or keyword Default 10 |
int or sequence Set a number of bins or provide bin boundaries. |
backend |
Optional Positional or keyword Default None |
str or callable or None |
legend |
Optional Positional or keyword Default False |
bool Choose whether to display a legend. |
**kwargs |
Optional Additional keyword arguments |
Returns
matplotlib.axes.Axes or ndarray of Axes