Skip to content

Commit 612823e

Browse files
DOC: Fix EX03 flake8 errors in docstrings (#56834)
* Fix formatting in `pandas.Series.cat.set_categories` and `pandas.Series.plot.bar` * Remove unused code in code_checks.sh --------- Co-authored-by: Marc Garcia <[email protected]>
1 parent f4f006c commit 612823e

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

ci/code_checks.sh

-3
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7171

7272
MSG='Partially validate docstrings (EX03)' ; echo $MSG
7373
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX03 --ignore_functions \
74-
pandas.Series.cat.set_categories \
75-
pandas.Series.plot.bar \
76-
pandas.Series.plot.hist \
7774
pandas.Series.plot.line \
7875
pandas.Series.to_sql \
7976
pandas.Series.to_latex \

pandas/core/arrays/categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ def set_categories(
10821082
For :class:`pandas.Series`:
10831083
10841084
>>> raw_cat = pd.Categorical(['a', 'b', 'c', 'A'],
1085-
... categories=['a', 'b', 'c'], ordered=True)
1085+
... categories=['a', 'b', 'c'], ordered=True)
10861086
>>> ser = pd.Series(raw_cat)
10871087
>>> ser
10881088
0 a

pandas/plotting/_core.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ def line(
11141114
.. plot::
11151115
:context: close-figs
11161116
1117-
>>> df = pd.DataFrame({'lab':['A', 'B', 'C'], 'val':[10, 30, 20]})
1117+
>>> df = pd.DataFrame({'lab': ['A', 'B', 'C'], 'val': [10, 30, 20]})
11181118
>>> ax = df.plot.bar(x='lab', y='val', rot=0)
11191119
11201120
Plot a whole dataframe to a bar plot. Each column is assigned a
@@ -1195,7 +1195,7 @@ def bar( # pylint: disable=disallowed-name
11951195
"""
11961196
See Also
11971197
--------
1198-
DataFrame.plot.bar: Vertical bar plot.
1198+
DataFrame.plot.bar : Vertical bar plot.
11991199
DataFrame.plot : Make plots of DataFrame using matplotlib.
12001200
matplotlib.axes.Axes.bar : Plot a vertical bar plot using matplotlib.
12011201

0 commit comments

Comments
 (0)