From 85fa90e999922064b5397d2df18c01148e133a07 Mon Sep 17 00:00:00 2001 From: Axeldnahcram Date: Mon, 2 Dec 2024 23:19:39 +0100 Subject: [PATCH 1/6] DOC: fix sem --- pandas/core/groupby/groupby.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 48d4e0456d4fa..92b803fb13c33 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -2658,6 +2658,10 @@ def sem(self, ddof: int = 1, numeric_only: bool = False) -> NDFrameT: Series or DataFrame Standard error of the mean of values within each group. + See Also + -------- + DataFrame.sem : Return unbiased standard error of the mean over requested axis. + Examples -------- For SeriesGroupBy: From 082059c47e881fc18e9a138fc4f639c01bc126b7 Mon Sep 17 00:00:00 2001 From: Axeldnahcram Date: Mon, 2 Dec 2024 23:47:03 +0100 Subject: [PATCH 2/6] Added sections --- pandas/core/groupby/groupby.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 92b803fb13c33..07655fb816b4f 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -715,7 +715,16 @@ def get_group(self, name) -> DataFrame | Series: Returns ------- - DataFrame or Series + Series or DataFrame + Get the respective Series or DataFrame corresponding to the group provided + + See Also + -------- + DataFrameGroupBy.groups: dictionary representation of the groupings formed during a groupby operation + DataFrameGroupBy.indices: Provides a mapping of group rows to positions of the elements. + SeriesGroupBy.groups: dictionary representation of the groupings formed during a groupby operation + SeriesGroupBy.indices: Provides a mapping of group rows to positions of the elements. + Examples -------- From cc53d126708a75e76bf3fc87e45439ac808a1b34 Mon Sep 17 00:00:00 2001 From: Axeldnahcram Date: Mon, 2 Dec 2024 23:55:29 +0100 Subject: [PATCH 3/6] DOC: fix See also --- pandas/core/groupby/groupby.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 07655fb816b4f..85fdb13e557d1 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -2670,6 +2670,7 @@ def sem(self, ddof: int = 1, numeric_only: bool = False) -> NDFrameT: See Also -------- DataFrame.sem : Return unbiased standard error of the mean over requested axis. + Series.sem : Return unbiased standard error of the mean over requested axis. Examples -------- From b1678403dc49f2e696e89b3c42800e7d6b967909 Mon Sep 17 00:00:00 2001 From: Axeldnahcram Date: Mon, 2 Dec 2024 23:55:49 +0100 Subject: [PATCH 4/6] Remove failed docstrings --- ci/code_checks.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index dde98a01cc770..6033440a54ab1 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -87,20 +87,14 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -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.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.plot PR02" \ - -i "pandas.core.groupby.SeriesGroupBy.sem SA01" \ - -i "pandas.core.resample.Resampler.get_group RT03,SA01" \ -i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \ -i "pandas.core.resample.Resampler.mean SA01" \ -i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \ -i "pandas.core.resample.Resampler.prod SA01" \ -i "pandas.core.resample.Resampler.quantile PR01,PR07" \ - -i "pandas.core.resample.Resampler.sem SA01" \ -i "pandas.core.resample.Resampler.std SA01" \ -i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \ -i "pandas.core.resample.Resampler.var SA01" \ From c670853bcd0bf57ee5286e28880e5df79715f793 Mon Sep 17 00:00:00 2001 From: Axeldnahcram Date: Tue, 3 Dec 2024 00:15:51 +0100 Subject: [PATCH 5/6] Fix: Matches the right format --- pandas/core/groupby/groupby.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 85fdb13e557d1..a0a5a14d6db43 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -716,16 +716,15 @@ def get_group(self, name) -> DataFrame | Series: Returns ------- Series or DataFrame - Get the respective Series or DataFrame corresponding to the group provided + Get the respective Series or DataFrame corresponding to the group provided. See Also -------- - DataFrameGroupBy.groups: dictionary representation of the groupings formed during a groupby operation + DataFrameGroupBy.groups: Dictionary representation of the groupings formed during a groupby operation. DataFrameGroupBy.indices: Provides a mapping of group rows to positions of the elements. - SeriesGroupBy.groups: dictionary representation of the groupings formed during a groupby operation + SeriesGroupBy.groups: Dictionary representation of the groupings formed during a groupby operation. SeriesGroupBy.indices: Provides a mapping of group rows to positions of the elements. - Examples -------- From f731062937ceed04eca0122206293ff5552a215f Mon Sep 17 00:00:00 2001 From: Axeldnahcram Date: Tue, 3 Dec 2024 11:50:27 +0100 Subject: [PATCH 6/6] Pre commit format --- pandas/core/groupby/groupby.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index a0a5a14d6db43..f0513be3498d1 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -720,10 +720,14 @@ def get_group(self, name) -> DataFrame | Series: See Also -------- - DataFrameGroupBy.groups: Dictionary representation of the groupings formed during a groupby operation. - DataFrameGroupBy.indices: Provides a mapping of group rows to positions of the elements. - SeriesGroupBy.groups: Dictionary representation of the groupings formed during a groupby operation. - SeriesGroupBy.indices: Provides a mapping of group rows to positions of the elements. + DataFrameGroupBy.groups: Dictionary representation of the groupings formed + during a groupby operation. + DataFrameGroupBy.indices: Provides a mapping of group rows to positions + of the elements. + SeriesGroupBy.groups: Dictionary representation of the groupings formed + during a groupby operation. + SeriesGroupBy.indices: Provides a mapping of group rows to positions + of the elements. Examples --------