Skip to content

DOC: fix SA01 for pandas.MultiIndex.nlevels #58976

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 1 commit into from
Jun 11, 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
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.MultiIndex.get_loc_level PR07" \
-i "pandas.MultiIndex.levshape SA01" \
-i "pandas.MultiIndex.names SA01" \
-i "pandas.MultiIndex.nlevels SA01" \
-i "pandas.MultiIndex.remove_unused_levels RT03,SA01" \
-i "pandas.MultiIndex.reorder_levels RT03,SA01" \
-i "pandas.MultiIndex.set_levels RT03,SA01" \
Expand Down
7 changes: 7 additions & 0 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,13 @@ def nlevels(self) -> int:
"""
Integer number of levels in this MultiIndex.

See Also
--------
MultiIndex.levels : Get the levels of the MultiIndex.
MultiIndex.codes : Get the codes of the MultiIndex.
MultiIndex.from_arrays : Convert arrays to MultiIndex.
MultiIndex.from_tuples : Convert list of tuples to MultiIndex.

Examples
--------
>>> mi = pd.MultiIndex.from_arrays([["a"], ["b"], ["c"]])
Expand Down
Loading