Skip to content

Commit

Permalink
DOC: fix SA01,ES01 for pandas.errors.DuplicateLabelError (#60399)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinsharma121 authored Nov 25, 2024
1 parent 582740b commit 9fab4eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.core.resample.Resampler.std SA01" \
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.var SA01" \
-i "pandas.errors.DuplicateLabelError SA01" \
-i "pandas.errors.IntCastingNaNError SA01" \
-i "pandas.errors.InvalidIndexError SA01" \
-i "pandas.errors.NullFrequencyError SA01" \
Expand Down
13 changes: 13 additions & 0 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,19 @@ class DuplicateLabelError(ValueError):
"""
Error raised when an operation would introduce duplicate labels.
This error is typically encountered when performing operations on objects
with `allows_duplicate_labels=False` and the operation would result in
duplicate labels in the index. Duplicate labels can lead to ambiguities
in indexing and reduce data integrity.
See Also
--------
Series.set_flags : Return a new ``Series`` object with updated flags.
DataFrame.set_flags : Return a new ``DataFrame`` object with updated flags.
Series.reindex : Conform ``Series`` object to new index with optional filling logic.
DataFrame.reindex : Conform ``DataFrame`` object to new index with optional filling
logic.
Examples
--------
>>> s = pd.Series([0, 1, 2], index=["a", "b", "c"]).set_flags(
Expand Down

0 comments on commit 9fab4eb

Please sign in to comment.