Skip to content

Fix SA01 errors for Series.dtype, Series.is_unique, Series.shape #58542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.dt.tz_convert PR01,PR02" \
-i "pandas.Series.dt.tz_localize PR01,PR02" \
-i "pandas.Series.dt.unit GL08" \
-i "pandas.Series.dtype SA01" \
-i "pandas.Series.eq PR07,SA01" \
-i "pandas.Series.floordiv PR07" \
-i "pandas.Series.ge PR07,SA01" \
-i "pandas.Series.gt PR07,SA01" \
-i "pandas.Series.hasnans SA01" \
-i "pandas.Series.is_monotonic_decreasing SA01" \
-i "pandas.Series.is_monotonic_increasing SA01" \
-i "pandas.Series.is_unique SA01" \
-i "pandas.Series.kurt RT03,SA01" \
-i "pandas.Series.kurtosis RT03,SA01" \
-i "pandas.Series.le PR07,SA01" \
Expand Down Expand Up @@ -237,7 +235,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Series.rsub PR07" \
-i "pandas.Series.rtruediv PR07" \
-i "pandas.Series.sem PR01,RT03,SA01" \
-i "pandas.Series.shape SA01" \
-i "pandas.Series.skew RT03,SA01" \
-i "pandas.Series.sparse PR01,SA01" \
-i "pandas.Series.sparse.density SA01" \
Expand Down
12 changes: 12 additions & 0 deletions pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,12 @@ def shape(self) -> Shape:
"""
Return a tuple of the shape of the underlying data.

See Also
--------
Series.ndim : Number of dimensions of the underlying data.
Series.size : Return the number of elements in the underlying data.
Series.nbytes : Return the number of bytes in the underlying data.

Examples
--------
>>> s = pd.Series([1, 2, 3])
Expand Down Expand Up @@ -1097,6 +1103,12 @@ def is_unique(self) -> bool:
-------
bool

See Also
--------
Series.unique : Return unique values of Series object.
Series.drop_duplicates : Return Series with duplicate values removed.
Series.duplicated : Indicate duplicate Series values.

Examples
--------
>>> s = pd.Series([1, 2, 3])
Expand Down
7 changes: 7 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,13 @@ def dtype(self) -> DtypeObj:
"""
Return the dtype object of the underlying data.

See Also
--------
Series.dtypes : Return the dtype object of the underlying data.
Series.astype : Cast a pandas object to a specified dtype dtype.
Series.convert_dtypes : Convert columns to the best possible dtypes using dtypes
supporting pd.NA.

Examples
--------
>>> s = pd.Series([1, 2, 3])
Expand Down