From 5411cc45ffdc38f528c5d4477f3a159f3e1e5b2b Mon Sep 17 00:00:00 2001 From: Brett Dixon <93047660+BDixon808@users.noreply.github.com> Date: Mon, 10 Jun 2024 09:45:14 -0700 Subject: [PATCH] DOC: added see also to docstrings in mean and median (#58951) * added see also to docstrings * fixed typing * Updated code check --- ci/code_checks.sh | 4 ++-- pandas/core/generic.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 7bf676d5628aa..188f5678bbbba 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -71,8 +71,8 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i ES01 `# For now it is ok if docstrings are missing the extended summary` \ -i "pandas.Series.dt PR01" `# Accessors are implemented as classes, but we do not document the Parameters section` \ -i "pandas.DataFrame.max RT03" \ - -i "pandas.DataFrame.mean RT03,SA01" \ - -i "pandas.DataFrame.median RT03,SA01" \ + -i "pandas.DataFrame.mean RT03" \ + -i "pandas.DataFrame.median RT03" \ -i "pandas.DataFrame.min RT03" \ -i "pandas.DataFrame.plot PR02" \ -i "pandas.Grouper PR02" \ diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 80314c2648f45..84745b25b5eef 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -12571,7 +12571,7 @@ def make_doc(name: str, ndim: int) -> str: elif name == "median": base_doc = _num_doc desc = "Return the median of the values over the requested axis." - see_also = "" + see_also = _stat_func_see_also examples = """ Examples @@ -12612,7 +12612,7 @@ def make_doc(name: str, ndim: int) -> str: elif name == "mean": base_doc = _num_doc desc = "Return the mean of the values over the requested axis." - see_also = "" + see_also = _stat_func_see_also examples = """ Examples @@ -12760,6 +12760,7 @@ def make_doc(name: str, ndim: int) -> str: a 0.0 dtype: float64""" kwargs = {"min_count": ""} + elif name == "kurt": base_doc = _num_doc desc = (