Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.arrays.IntervalArray.length SA01" \
-i "pandas.arrays.NumpyExtensionArray SA01" \
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
Expand Down
15 changes: 14 additions & 1 deletion pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,12 @@ def indices(self) -> dict[Hashable, npt.NDArray[np.intp]]:
"""
Dict {group name -> group indices}.

See Also
--------
DataFrame.groupby : Apply a groupby operation on a DataFrame.
Series.groupby : Apply a groupby operation on a Series.
Resampler.indices : Return the indices of the groups in a resampler.

Examples
--------

Expand Down Expand Up @@ -564,6 +570,7 @@ def indices(self) -> dict[Hashable, npt.NDArray[np.intp]]:
"""
return self._grouper.indices


@final
def _get_indices(self, names):
"""
Expand Down Expand Up @@ -707,10 +714,16 @@ def get_group(self, name) -> DataFrame | Series:
Returns
-------
DataFrame or Series
A DataFrame or Series corresponding to the group with the specified name.

Examples
See Also
--------
DataFrame.groupby : Apply a groupby operation on a DataFrame.
Series.groupby : Apply a groupby operation on a Series.
Resampler.get_group : Get a group from a resampler.

Examples
--------
For SeriesGroupBy:

>>> lst = ["a", "a", "b"]
Expand Down
32 changes: 23 additions & 9 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,19 +570,24 @@ def boxplot_frame_groupby(

Parameters
----------
grouped : Grouped DataFrame
grouped : DataFrameGroupBy
The grouped DataFrame to plot.
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 : float or str
rot : label rotation angle
grid : Setting this to True will show the grid
fontsize : int or None
Font size for the labels.
rot : int
Rotation angle of the labels.
grid : bool
Setting this to True will show the grid.
ax : Matplotlib axis object, default None
figsize : A tuple (width, height) in inches
layout : tuple (optional)
An axis object to plot on. If None, a new figure and axis will be created.
figsize : tuple of (float, float) or None
A tuple (width, height) in inches.
layout : tuple of (int, int) or None
The layout of the plot: (rows, columns).
sharex : bool, default False
Whether x-axes will be shared among subplots.
Expand All @@ -599,8 +604,17 @@ def boxplot_frame_groupby(

Returns
-------
dict of key/value = group key/DataFrame.boxplot return value
or DataFrame.boxplot return value in case subplots=figures=False
dict of key/value pairs or DataFrame.boxplot
When subplots=True, returns a dictionary where keys are group names and
values are the matplotlib BoxPlot objects for each group.
When subplots=False, returns a single matplotlib BoxPlot object for the
combined plot.

See Also
--------
DataFrame.boxplot : Make box plots from DataFrame data.
Series.boxplot : Make box plots from Series data.
pandas.plotting.boxplot : Lower-level method for creating box plots.

Examples
--------
Expand Down
Loading