Skip to content

Commit

Permalink
DOC: Resolve RT03 errors in several methods #2 (#57785)
Browse files Browse the repository at this point in the history
* Add return info for nsmallest method

* Add result info on nunique.

* Add return information to pipe method.

* Add return information for boxplot method

* Add return information for kde plot.

* Add result information for scatter plot.

* Remove resolved methods from ignore_functions parameter

* Reinsert method to code checker which was erroneously removed.
  • Loading branch information
bergnerjonas authored Mar 8, 2024
1 parent 1962c3f commit 4692686
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
7 changes: 0 additions & 7 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
pandas.DataFrame.mean\
pandas.DataFrame.median\
pandas.DataFrame.min\
pandas.DataFrame.nsmallest\
pandas.DataFrame.nunique\
pandas.DataFrame.pipe\
pandas.DataFrame.plot.box\
pandas.DataFrame.plot.density\
pandas.DataFrame.plot.kde\
pandas.DataFrame.plot.scatter\
pandas.DataFrame.pop\
pandas.DataFrame.prod\
pandas.DataFrame.product\
Expand Down
2 changes: 2 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -7432,6 +7432,7 @@ def nsmallest(
Returns
-------
DataFrame
DataFrame with the first `n` rows ordered by `columns` in ascending order.
See Also
--------
Expand Down Expand Up @@ -11898,6 +11899,7 @@ def nunique(self, axis: Axis = 0, dropna: bool = True) -> Series:
Returns
-------
Series
Series with counts of unique values per row or column, depending on `axis`.
See Also
--------
Expand Down
5 changes: 3 additions & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5846,7 +5846,8 @@ def pipe(
Returns
-------
the return type of ``func``.
The return type of ``func``.
The result of applying ``func`` to the Series or DataFrame.
See Also
--------
Expand All @@ -5862,7 +5863,7 @@ def pipe(
Examples
--------
Constructing a income DataFrame from a dictionary.
Constructing an income DataFrame from a dictionary.
>>> data = [[8000, 1000], [9500, np.nan], [5000, 2000]]
>>> df = pd.DataFrame(data, columns=["Salary", "Others"])
Expand Down
3 changes: 3 additions & 0 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,6 +1335,7 @@ def box(self, by: IndexLabel | None = None, **kwargs) -> PlotAccessor:
Returns
-------
:class:`matplotlib.axes.Axes` or numpy.ndarray of them
The matplotlib axes containing the box plot.
See Also
--------
Expand Down Expand Up @@ -1466,6 +1467,7 @@ def kde(
Returns
-------
matplotlib.axes.Axes or numpy.ndarray of them
The matplotlib axes containing the KDE plot.
See Also
--------
Expand Down Expand Up @@ -1745,6 +1747,7 @@ def scatter(
Returns
-------
:class:`matplotlib.axes.Axes` or numpy.ndarray of them
The matplotlib axes containing the scatter plot.
See Also
--------
Expand Down

0 comments on commit 4692686

Please sign in to comment.