Skip to content

Commit

Permalink
DOC: fix EX03 errors in docstrings (pandas-dev#56855)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqa236 authored and pmhatre1 committed May 7, 2024
1 parent ee5bbf7 commit 72594ba
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.io.formats.style.Styler.background_gradient \
pandas.io.formats.style.Styler.text_gradient \
pandas.DataFrame.plot.hexbin \
pandas.DataFrame.plot.line \
pandas.DataFrame.plot.line
RET=$(($RET + $?)) ; echo $MSG "DONE"

fi
Expand Down
5 changes: 4 additions & 1 deletion pandas/core/arrays/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ class DatetimeArray(dtl.TimelikeOps, dtl.DatelikeOps): # type: ignore[misc]
Examples
--------
>>> pd.arrays.DatetimeArray._from_sequence(
... pd.DatetimeIndex(['2023-01-01', '2023-01-02'], freq='D'))
... pd.DatetimeIndex(
... ["2023-01-01", "2023-01-02"], freq="D"
... )
... )
<DatetimeArray>
['2023-01-01 00:00:00', '2023-01-02 00:00:00']
Length: 2, dtype: datetime64[ns]
Expand Down
3 changes: 2 additions & 1 deletion pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2124,7 +2124,8 @@ def droplevel(self, level: IndexLabel = 0):
Examples
--------
>>> mi = pd.MultiIndex.from_arrays(
... [[1, 2], [3, 4], [5, 6]], names=['x', 'y', 'z'])
... [[1, 2], [3, 4], [5, 6]], names=['x', 'y', 'z']
... )
>>> mi
MultiIndex([(1, 3, 5),
(2, 4, 6)],
Expand Down
3 changes: 2 additions & 1 deletion pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,8 @@ def _set_names(self, names, *, level=None, validate: bool = True) -> None:
Examples
--------
>>> mi = pd.MultiIndex.from_arrays(
... [[1, 2], [3, 4], [5, 6]], names=['x', 'y', 'z'])
... [[1, 2], [3, 4], [5, 6]], names=['x', 'y', 'z']
... )
>>> mi
MultiIndex([(1, 3, 5),
(2, 4, 6)],
Expand Down

0 comments on commit 72594ba

Please sign in to comment.