Skip to content
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

DOC: fix SA01,ES01 for pandas.errors.DuplicateLabelError #60399

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 @@ -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 @@ -388,6 +388,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