Skip to content

DOC: Fix docstring validation errors for pandas.core.groupby #60365

Open
@jmalp

Description

@jmalp

Parent Issue: #58063
pandas has a script for validating docstrings:

pandas/ci/code_checks.sh

Lines 92 to 105 in 6a7685f

-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.nth PR02" \
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing SA01" \
-i "pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing SA01" \
-i "pandas.core.groupby.SeriesGroupBy.nth PR02" \
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \

Currently, some methods fail docstring validation check.
The task is:

  1. Take 1-5 methods
  2. Run: scripts/validate_docstrings.py

Example command:

scripts/validate_docstrings.py pandas.core.groupby.DataFrameGroupBy.get_group

Example output:

################################################################################
################################## Validation ##################################
################################################################################

3 Errors found for `pandas.core.groupby.DataFrameGroupBy.get_group`:
        ES01    No extended summary found
        RT03    Return value has no description
        SA01    See Also section not found
  1. Check if validation docstrings passes for those methods, and if it’s necessary fix the docstrings according to whatever error is reported. Note: Ignore ES01 errors, these are not required to be fixed.

  2. Remove those methods from 'code_checks.sh' if all errors are cleared and the docstring is correct, otherwise, remove the specific error that was fixed from the list of errors for that method.

  3. Commit, push, open pull request

Please don't comment take as multiple people can work on this issue. Just comment on which methods you are going to work on.

If you're new contributor, please check the contributing guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions