Skip to content

Commit 31c2de5

Browse files
DOC: fix SA01 for pandas.MultiIndex.nlevels (pandas-dev#58976)
1 parent 629ffeb commit 31c2de5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8484
-i "pandas.MultiIndex.get_loc_level PR07" \
8585
-i "pandas.MultiIndex.levshape SA01" \
8686
-i "pandas.MultiIndex.names SA01" \
87-
-i "pandas.MultiIndex.nlevels SA01" \
8887
-i "pandas.MultiIndex.remove_unused_levels RT03,SA01" \
8988
-i "pandas.MultiIndex.reorder_levels RT03,SA01" \
9089
-i "pandas.MultiIndex.set_levels RT03,SA01" \

pandas/core/indexes/multi.py

+7
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,13 @@ def nlevels(self) -> int:
10311031
"""
10321032
Integer number of levels in this MultiIndex.
10331033
1034+
See Also
1035+
--------
1036+
MultiIndex.levels : Get the levels of the MultiIndex.
1037+
MultiIndex.codes : Get the codes of the MultiIndex.
1038+
MultiIndex.from_arrays : Convert arrays to MultiIndex.
1039+
MultiIndex.from_tuples : Convert list of tuples to MultiIndex.
1040+
10341041
Examples
10351042
--------
10361043
>>> mi = pd.MultiIndex.from_arrays([["a"], ["b"], ["c"]])

0 commit comments

Comments
 (0)