From cdf7dbcf5f0df300833fc8de63c28ea5c43b3ede Mon Sep 17 00:00:00 2001 From: Dea Leon Date: Fri, 3 Feb 2023 12:58:48 +0100 Subject: [PATCH 1/2] DOC Correcting EX02 errors --- ci/code_checks.sh | 5 ----- pandas/core/generic.py | 8 ++++++-- pandas/plotting/_core.py | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 9c8d48bc6ba45..6344854702edf 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -578,9 +578,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then MSG='Partially validate docstrings (EX02)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX02 --ignore_functions \ - pandas.DataFrame.plot.line \ - pandas.DataFrame.std \ - pandas.DataFrame.var \ pandas.Index.factorize \ pandas.Period.strftime \ pandas.Series.factorize \ @@ -590,8 +587,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.Series.sparse.density \ pandas.Series.sparse.npoints \ pandas.Series.sparse.sp_values \ - pandas.Series.std \ - pandas.Series.var \ pandas.Timestamp.fromtimestamp \ pandas.api.types.infer_dtype \ pandas.api.types.is_bool_dtype \ diff --git a/pandas/core/generic.py b/pandas/core/generic.py index e92059c552b65..603b40a80daa2 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -11906,12 +11906,14 @@ def _doc_params(cls): >>> df.std() age 18.786076 height 0.237417 +dtype: float64 Alternatively, `ddof=0` can be set to normalize by N instead of N-1: >>> df.std(ddof=0) age 16.269219 -height 0.205609""" +height 0.205609 +dtype: float64""" _var_examples = """ @@ -11932,12 +11934,14 @@ def _doc_params(cls): >>> df.var() age 352.916667 height 0.056367 +dtype: float64 Alternatively, ``ddof=0`` can be set to normalize by N instead of N-1: >>> df.var(ddof=0) age 264.687500 -height 0.042275""" +height 0.042275 +dtype: float64""" _bool_doc = """ {desc} diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index fbd1eef138792..d3e54f221d1c3 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -1003,7 +1003,7 @@ def __call__(self, *args, **kwargs): >>> s = pd.Series([1, 3, 2]) >>> s.plot.line() - + .. plot:: :context: close-figs From 4ce52f16a8a88e2a777333bbfd08fcf40aa0a5f4 Mon Sep 17 00:00:00 2001 From: Dea Leon Date: Fri, 3 Feb 2023 16:03:36 +0100 Subject: [PATCH 2/2] DOC Fixing EX02 error - issue with plot.line --- ci/code_checks.sh | 1 + pandas/plotting/_core.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 6344854702edf..cb66a1f350e8f 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -578,6 +578,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then MSG='Partially validate docstrings (EX02)' ; echo $MSG $BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX02 --ignore_functions \ + pandas.DataFrame.plot.line \ pandas.Index.factorize \ pandas.Period.strftime \ pandas.Series.factorize \ diff --git a/pandas/plotting/_core.py b/pandas/plotting/_core.py index d3e54f221d1c3..fbd1eef138792 100644 --- a/pandas/plotting/_core.py +++ b/pandas/plotting/_core.py @@ -1003,7 +1003,7 @@ def __call__(self, *args, **kwargs): >>> s = pd.Series([1, 3, 2]) >>> s.plot.line() - + .. plot:: :context: close-figs