From 5fff2cd4818514a2d217e4202e1d78de2290c207 Mon Sep 17 00:00:00 2001 From: Amey Shinde Date: Wed, 14 Feb 2024 11:08:27 -0600 Subject: [PATCH] DOC: fix SA05 errors in docstring for pandas.core.groupby.DataFrameGroupBy - first, last (#57414) * Fixing SA05 for first and last core.groupby.DataFrameGroupBy * remove function from code_checks --- ci/code_checks.sh | 2 -- pandas/core/groupby/groupby.py | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 7e95827dfce30..df545e35fc7ff 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -1543,8 +1543,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then MSG='Partially validate docstrings (SA05)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=SA05 --ignore_functions \ - pandas.core.groupby.DataFrameGroupBy.first\ - pandas.core.groupby.DataFrameGroupBy.last\ pandas.core.groupby.SeriesGroupBy.first\ pandas.core.groupby.SeriesGroupBy.last\ pandas.core.resample.Resampler.first\ diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 1be1cdfcd0f50..103f7b55c0550 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -3219,9 +3219,9 @@ def first( -------- DataFrame.groupby : Apply a function groupby to each row or column of a DataFrame. - pandas.core.groupby.DataFrameGroupBy.last : Compute the last non-null entry + core.groupby.DataFrameGroupBy.last : Compute the last non-null entry of each column. - pandas.core.groupby.DataFrameGroupBy.nth : Take the nth row from each group. + core.groupby.DataFrameGroupBy.nth : Take the nth row from each group. Examples -------- @@ -3306,9 +3306,9 @@ def last( -------- DataFrame.groupby : Apply a function groupby to each row or column of a DataFrame. - pandas.core.groupby.DataFrameGroupBy.first : Compute the first non-null entry + core.groupby.DataFrameGroupBy.first : Compute the first non-null entry of each column. - pandas.core.groupby.DataFrameGroupBy.nth : Take the nth row from each group. + core.groupby.DataFrameGroupBy.nth : Take the nth row from each group. Examples --------