Skip to content

Commit 3b0824e

Browse files
DOC: Fix SA01 errors for Index.hasnans, Index.map, Index.nbytes (#58343)
* Shorten sentence length * Remove Series.nbytes from ci/code_checks.sh * Update see also method names * Update see also method names * Update see also methods for Index.map * Update method descriptions
1 parent b111ac6 commit 3b0824e

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

ci/code_checks.sh

-4
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,15 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
156156
-i "pandas.Index.get_indexer_non_unique PR07,SA01" \
157157
-i "pandas.Index.get_loc PR07,RT03,SA01" \
158158
-i "pandas.Index.get_slice_bound PR07" \
159-
-i "pandas.Index.hasnans SA01" \
160159
-i "pandas.Index.identical PR01,SA01" \
161160
-i "pandas.Index.inferred_type SA01" \
162161
-i "pandas.Index.insert PR07,RT03,SA01" \
163162
-i "pandas.Index.intersection PR07,RT03,SA01" \
164163
-i "pandas.Index.item SA01" \
165164
-i "pandas.Index.join PR07,RT03,SA01" \
166-
-i "pandas.Index.map SA01" \
167165
-i "pandas.Index.memory_usage RT03" \
168166
-i "pandas.Index.name SA01" \
169167
-i "pandas.Index.names GL08" \
170-
-i "pandas.Index.nbytes SA01" \
171168
-i "pandas.Index.nunique RT03" \
172169
-i "pandas.Index.putmask PR01,RT03" \
173170
-i "pandas.Index.ravel PR01,RT03" \
@@ -344,7 +341,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
344341
-i "pandas.Series.mod PR07" \
345342
-i "pandas.Series.mode SA01" \
346343
-i "pandas.Series.mul PR07" \
347-
-i "pandas.Series.nbytes SA01" \
348344
-i "pandas.Series.ne PR07,SA01" \
349345
-i "pandas.Series.nunique RT03" \
350346
-i "pandas.Series.pad PR01,SA01" \

pandas/core/base.py

+5
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,11 @@ def nbytes(self) -> int:
419419
"""
420420
Return the number of bytes in the underlying data.
421421
422+
See Also
423+
--------
424+
Series.ndim : Number of dimensions of the underlying data.
425+
Series.size : Return the number of elements in the underlying data.
426+
422427
Examples
423428
--------
424429
For Series:

pandas/core/indexes/base.py

+10
Original file line numberDiff line numberDiff line change
@@ -2423,6 +2423,12 @@ def hasnans(self) -> bool:
24232423
-------
24242424
bool
24252425
2426+
See Also
2427+
--------
2428+
Index.isna : Detect missing values.
2429+
Index.dropna : Return Index without NA/NaN values.
2430+
Index.fillna : Fill NA/NaN values with the specified value.
2431+
24262432
Examples
24272433
--------
24282434
>>> s = pd.Series([1, 2, 3], index=["a", "b", None])
@@ -6067,6 +6073,10 @@ def map(self, mapper, na_action: Literal["ignore"] | None = None):
60676073
If the function returns a tuple with more than one element
60686074
a MultiIndex will be returned.
60696075
6076+
See Also
6077+
--------
6078+
Index.where : Replace values where the condition is False.
6079+
60706080
Examples
60716081
--------
60726082
>>> idx = pd.Index([1, 2, 3])

0 commit comments

Comments
 (0)