Skip to content

Commit 8488b9c

Browse files
tuhinsharma121snitish
authored andcommitted
DOC: fix SA01,ES01 for pandas.errors.InvalidIndexError (pandas-dev#60400)
1 parent 0fd80ba commit 8488b9c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
110110
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
111111
-i "pandas.core.resample.Resampler.var SA01" \
112112
-i "pandas.errors.IntCastingNaNError SA01" \
113-
-i "pandas.errors.InvalidIndexError SA01" \
114113
-i "pandas.errors.NullFrequencyError SA01" \
115114
-i "pandas.errors.NumExprClobberingError SA01" \
116115
-i "pandas.errors.NumbaUtilError SA01" \

pandas/errors/__init__.py

+10
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,16 @@ class InvalidIndexError(Exception):
425425
"""
426426
Exception raised when attempting to use an invalid index key.
427427
428+
This exception is triggered when a user attempts to access or manipulate
429+
data in a pandas DataFrame or Series using an index key that is not valid
430+
for the given object. This may occur in cases such as using a malformed
431+
slice, a mismatched key for a ``MultiIndex``, or attempting to access an index
432+
element that does not exist.
433+
434+
See Also
435+
--------
436+
MultiIndex : A multi-level, or hierarchical, index object for pandas objects.
437+
428438
Examples
429439
--------
430440
>>> idx = pd.MultiIndex.from_product([["x", "y"], [0, 1]])

0 commit comments

Comments
 (0)