Skip to content

Commit ef4a196

Browse files
shriyakalakatapmhatre1
authored andcommitted
Fix SA01 errors for Series.dtype, Series.is_unique, Series.shape (pandas-dev#58542)
* DOC: fix SA01 error for Series.dtype * DOC: fix SA01 error for Series.is_unique * DOC: fix SA01 error for Series.shape
1 parent 3e13cf4 commit ef4a196

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

ci/code_checks.sh

-3
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,13 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
196196
-i "pandas.Series.dt.tz_convert PR01,PR02" \
197197
-i "pandas.Series.dt.tz_localize PR01,PR02" \
198198
-i "pandas.Series.dt.unit GL08" \
199-
-i "pandas.Series.dtype SA01" \
200199
-i "pandas.Series.eq PR07,SA01" \
201200
-i "pandas.Series.floordiv PR07" \
202201
-i "pandas.Series.ge PR07,SA01" \
203202
-i "pandas.Series.gt PR07,SA01" \
204203
-i "pandas.Series.hasnans SA01" \
205204
-i "pandas.Series.is_monotonic_decreasing SA01" \
206205
-i "pandas.Series.is_monotonic_increasing SA01" \
207-
-i "pandas.Series.is_unique SA01" \
208206
-i "pandas.Series.kurt RT03,SA01" \
209207
-i "pandas.Series.kurtosis RT03,SA01" \
210208
-i "pandas.Series.le PR07,SA01" \
@@ -236,7 +234,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
236234
-i "pandas.Series.rsub PR07" \
237235
-i "pandas.Series.rtruediv PR07" \
238236
-i "pandas.Series.sem PR01,RT03,SA01" \
239-
-i "pandas.Series.shape SA01" \
240237
-i "pandas.Series.skew RT03,SA01" \
241238
-i "pandas.Series.sparse PR01,SA01" \
242239
-i "pandas.Series.sparse.density SA01" \

pandas/core/base.py

+12
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,12 @@ def shape(self) -> Shape:
342342
"""
343343
Return a tuple of the shape of the underlying data.
344344
345+
See Also
346+
--------
347+
Series.ndim : Number of dimensions of the underlying data.
348+
Series.size : Return the number of elements in the underlying data.
349+
Series.nbytes : Return the number of bytes in the underlying data.
350+
345351
Examples
346352
--------
347353
>>> s = pd.Series([1, 2, 3])
@@ -1102,6 +1108,12 @@ def is_unique(self) -> bool:
11021108
-------
11031109
bool
11041110
1111+
See Also
1112+
--------
1113+
Series.unique : Return unique values of Series object.
1114+
Series.drop_duplicates : Return Series with duplicate values removed.
1115+
Series.duplicated : Indicate duplicate Series values.
1116+
11051117
Examples
11061118
--------
11071119
>>> s = pd.Series([1, 2, 3])

pandas/core/series.py

+7
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,13 @@ def dtype(self) -> DtypeObj:
626626
"""
627627
Return the dtype object of the underlying data.
628628
629+
See Also
630+
--------
631+
Series.dtypes : Return the dtype object of the underlying data.
632+
Series.astype : Cast a pandas object to a specified dtype dtype.
633+
Series.convert_dtypes : Convert columns to the best possible dtypes using dtypes
634+
supporting pd.NA.
635+
629636
Examples
630637
--------
631638
>>> s = pd.Series([1, 2, 3])

0 commit comments

Comments
 (0)