From a238f5117c716aa096b86ac35a9546af8e68b8d9 Mon Sep 17 00:00:00 2001 From: Nitish Satyavolu Date: Mon, 3 Feb 2025 12:03:49 -0800 Subject: [PATCH] DOC: Fix description of skipna parameter in groupby reductions --- pandas/core/groupby/groupby.py | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index fdf2aab434695..27865a60f6ea3 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -2170,8 +2170,7 @@ def mean( numeric_only no longer accepts ``None`` and defaults to ``False``. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. .. versionadded:: 3.0.0 @@ -2271,8 +2270,7 @@ def median(self, numeric_only: bool = False, skipna: bool = True) -> NDFrameT: numeric_only no longer accepts ``None`` and defaults to False. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. .. versionadded:: 3.0.0 @@ -2405,8 +2403,7 @@ def std( numeric_only now defaults to ``False``. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. .. versionadded:: 3.0.0 @@ -2524,8 +2521,7 @@ def var( numeric_only now defaults to ``False``. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. .. versionadded:: 3.0.0 @@ -2742,8 +2738,7 @@ def sem( numeric_only now defaults to ``False``. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. .. versionadded:: 3.0.0 @@ -3021,8 +3016,7 @@ def prod( than ``min_count`` non-NA values are present the result will be NA. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. .. versionadded:: 3.0.0 @@ -3242,8 +3236,7 @@ def first( The required number of valid values to perform the operation. If fewer than ``min_count`` valid values are present the result will be NA. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. .. versionadded:: 2.2.1 @@ -3329,8 +3322,7 @@ def last( The required number of valid values to perform the operation. If fewer than ``min_count`` valid values are present the result will be NA. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. .. versionadded:: 2.2.1 @@ -5530,8 +5522,7 @@ def _idxmax_idxmin( numeric_only : bool, default False Include only float, int, boolean columns. skipna : bool, default True - Exclude NA/null values. If an entire row/column is NA, the result - will be NA. + Exclude NA/null values. If an entire group is NA, the result will be NA. ignore_unobserved : bool, default False When True and an unobserved group is encountered, do not raise. This used for transform where unobserved groups do not play an impact on the result.