Skip to content

Commit ac70f23

Browse files
lia2710Yaxin Li
and
Yaxin Li
authored
DOC: fix EX02 errors in docstrings (#51614)
* DOC: fix EX02 errors in docstrings * skipping radviz plotting doctest --------- Co-authored-by: Yaxin Li <[email protected]>
1 parent 1ccad12 commit ac70f23

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

ci/code_checks.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
567567
pandas.plotting.andrews_curves \
568568
pandas.plotting.autocorrelation_plot \
569569
pandas.plotting.lag_plot \
570-
pandas.plotting.parallel_coordinates \
571-
pandas.plotting.radviz \
572-
pandas.tseries.frequencies.to_offset
570+
pandas.plotting.parallel_coordinates
573571
RET=$(($RET + $?)) ; echo $MSG "DONE"
574572

575573
fi

pandas/_libs/tslibs/offsets.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -4109,6 +4109,7 @@ cpdef to_offset(freq):
41094109
41104110
Examples
41114111
--------
4112+
>>> from pandas.tseries.frequencies import to_offset
41124113
>>> to_offset("5min")
41134114
<5 * Minutes>
41144115
@@ -4124,7 +4125,7 @@ cpdef to_offset(freq):
41244125
>>> to_offset(pd.Timedelta(days=1))
41254126
<Day>
41264127
4127-
>>> to_offset(Hour())
4128+
>>> to_offset(pd.offsets.Hour())
41284129
<Hour>
41294130
"""
41304131
if freq is None:

pandas/plotting/_misc.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ def radviz(
246246
... ]
247247
... }
248248
... )
249-
>>> pd.plotting.radviz(df, 'Category')
250-
<AxesSubplot: xlabel='y(t)', ylabel='y(t + 1)'>
249+
>>> pd.plotting.radviz(df, 'Category') # doctest: +SKIP
251250
"""
252251
plot_backend = _get_plot_backend("matplotlib")
253252
return plot_backend.radviz(

0 commit comments

Comments
 (0)