Skip to content

DOC: update groupby methods See Also section #42406

@mzeitlin11

Description

@mzeitlin11

Right now the default See Also section for a groupby method will include Series.groupby and DataFrame.groupby, both of which do not link to anything (and are not particularly informative on their own without a link). See for example https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.GroupBy.all.html.

Based on

_common_see_also = """
See Also
--------
Series.%(name)s : Apply a function %(name)s to a Series.
DataFrame.%(name)s : Apply a function %(name)s
to each row or column of a DataFrame.
"""
seems like the expected See Also would be to instead (for example with method all) link to
Series.all and DataFrame.all? The See Also could still link to groupby material if thought helpful, eg https://pandas.pydata.org/docs/reference/api/pandas.Series.groupby.html#pandas.Series.groupby and https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.groupby.html#pandas.DataFrame.groupby, but IMO most important is linking to the analogous Series/DataFrame doc which will usually be more informative.

Some groupby methods like backfill and quantile (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.groupby.DataFrameGroupBy.quantile.html) do include custom See Also sections, but Series.quantile and DataFrame.quantile do not render as links.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions