You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will raise an exception as the to be resampled dataframe has an axis with duplicates. The problem: I stumpbled at least twice on this problem and never understood what the error message wanted to tell me on first sight.
When seeing just the message (wihtout looking at the backtrace) I always thought this is about providing duplicate axis names or something like this.
ValueError: cannotreindexfromaduplicateaxis
Describe the solution you'd like
Maybe the exception message could be clarified. The comment two lines above the exception always saves me:
# trying to reindex on an axis with duplicates
So maybe something like this could help?
raiseValueError("Cannot reindex on an axis with duplicate values")
API breaking implications
None I guess.
The message would additionally need to be changed in some tests and in the docs.
Additional context
If there is interest I could draft a PR.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
Let's consider the following snippet:
This will raise an exception as the to be resampled dataframe has an axis with duplicates. The problem: I stumpbled at least twice on this problem and never understood what the error message wanted to tell me on first sight.
When seeing just the message (wihtout looking at the backtrace) I always thought this is about providing duplicate axis names or something like this.
Describe the solution you'd like
Maybe the exception message could be clarified. The comment two lines above the exception always saves me:
# trying to reindex on an axis with duplicates
So maybe something like this could help?
API breaking implications
None I guess.
The message would additionally need to be changed in some tests and in the docs.
Additional context
If there is interest I could draft a PR.
The text was updated successfully, but these errors were encountered: