Skip to content

DOC: Fix RT03 and SA01 errors for Index.droplevel, Index.dropna #58433

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 2 commits into from
Apr 26, 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 @@ -110,8 +110,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Index.copy PR07,SA01" \
-i "pandas.Index.difference PR07,RT03,SA01" \
-i "pandas.Index.drop PR07,SA01" \
-i "pandas.Index.droplevel RT03,SA01" \
-i "pandas.Index.dropna RT03,SA01" \
-i "pandas.Index.duplicated RT03" \
-i "pandas.Index.get_indexer PR07,SA01" \
-i "pandas.Index.get_indexer_for PR01,SA01" \
Expand Down Expand Up @@ -161,7 +159,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.MultiIndex.append PR07,SA01" \
-i "pandas.MultiIndex.copy PR07,RT03,SA01" \
-i "pandas.MultiIndex.drop PR07,RT03,SA01" \
-i "pandas.MultiIndex.droplevel RT03,SA01" \
-i "pandas.MultiIndex.dtypes SA01" \
-i "pandas.MultiIndex.get_indexer PR07,SA01" \
-i "pandas.MultiIndex.get_level_values SA01" \
Expand Down
12 changes: 12 additions & 0 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2093,6 +2093,12 @@ def droplevel(self, level: IndexLabel = 0):
Returns
-------
Index or MultiIndex
Returns an Index or MultiIndex object, depending on the resulting index
after removing the requested level(s).

See Also
--------
Index.dropna : Return Index without NA/NaN values.

Examples
--------
Expand Down Expand Up @@ -2615,6 +2621,12 @@ def dropna(self, how: AnyAll = "any") -> Self:
Returns
-------
Index
Returns an Index object after removing NA/NaN values.

See Also
--------
Index.fillna : Fill NA/NaN values with the specified value.
Index.isna : Detect missing values.

Examples
--------
Expand Down