From f322b7cc4f30feb81443783b12030c4a5549d64c Mon Sep 17 00:00:00 2001 From: Yaxin Li Date: Fri, 24 Feb 2023 10:20:18 -0600 Subject: [PATCH 1/2] DOC: fix EX02 errors in docstrings --- ci/code_checks.sh | 4 +--- pandas/_libs/tslibs/offsets.pyx | 3 ++- pandas/plotting/_misc.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 47e3ce0ae6ff7..2d5e9cc031158 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -567,9 +567,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.plotting.andrews_curves \ pandas.plotting.autocorrelation_plot \ pandas.plotting.lag_plot \ - pandas.plotting.parallel_coordinates \ - pandas.plotting.radviz \ - pandas.tseries.frequencies.to_offset + pandas.plotting.parallel_coordinates RET=$(($RET + $?)) ; echo $MSG "DONE" fi diff --git a/pandas/_libs/tslibs/offsets.pyx b/pandas/_libs/tslibs/offsets.pyx index e8e0ddbb404de..c21b47d53e669 100644 --- a/pandas/_libs/tslibs/offsets.pyx +++ b/pandas/_libs/tslibs/offsets.pyx @@ -4109,6 +4109,7 @@ cpdef to_offset(freq): Examples -------- + >>> from pandas.tseries.frequencies import to_offset >>> to_offset("5min") <5 * Minutes> @@ -4124,7 +4125,7 @@ cpdef to_offset(freq): >>> to_offset(pd.Timedelta(days=1)) - >>> to_offset(Hour()) + >>> to_offset(pd.offsets.Hour()) """ if freq is None: diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index 0eb6c826e2d4c..7dc09166dc563 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -247,7 +247,7 @@ def radviz( ... } ... ) >>> pd.plotting.radviz(df, 'Category') - + """ plot_backend = _get_plot_backend("matplotlib") return plot_backend.radviz( From b87661dd68ea6ea05899b50e60226d328d49cbc7 Mon Sep 17 00:00:00 2001 From: Yaxin Li Date: Mon, 27 Feb 2023 10:22:54 -0600 Subject: [PATCH 2/2] skipping radviz plotting doctest --- pandas/plotting/_misc.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pandas/plotting/_misc.py b/pandas/plotting/_misc.py index 7dc09166dc563..dd62a54f3809a 100644 --- a/pandas/plotting/_misc.py +++ b/pandas/plotting/_misc.py @@ -246,8 +246,7 @@ def radviz( ... ] ... } ... ) - >>> pd.plotting.radviz(df, 'Category') - + >>> pd.plotting.radviz(df, 'Category') # doctest: +SKIP """ plot_backend = _get_plot_backend("matplotlib") return plot_backend.radviz(