Skip to content

Commit 2749d49

Browse files
DOC: fix SA01,ES01 for pandas.errors.InvalidIndexError
1 parent ee0902a commit 2749d49

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
111111
-i "pandas.core.resample.Resampler.var SA01" \
112112
-i "pandas.errors.DuplicateLabelError SA01" \
113113
-i "pandas.errors.IntCastingNaNError SA01" \
114-
-i "pandas.errors.InvalidIndexError SA01" \
115114
-i "pandas.errors.NullFrequencyError SA01" \
116115
-i "pandas.errors.NumExprClobberingError SA01" \
117116
-i "pandas.errors.NumbaUtilError SA01" \

pandas/errors/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,16 @@ class InvalidIndexError(Exception):
407407
"""
408408
Exception raised when attempting to use an invalid index key.
409409
410+
This exception is triggered when a user attempts to access or manipulate
411+
data in a pandas DataFrame or Series using an index key that is not valid
412+
for the given object. This may occur in cases such as using a malformed
413+
slice, a mismatched key for a ``MultiIndex``, or attempting to access an index
414+
element that does not exist.
415+
416+
See Also
417+
--------
418+
MultiIndex : A multi-level, or hierarchical, index object for pandas objects.
419+
410420
Examples
411421
--------
412422
>>> idx = pd.MultiIndex.from_product([["x", "y"], [0, 1]])

0 commit comments

Comments
 (0)