Skip to content

Conversation

aberres
Copy link
Contributor

@aberres aberres commented Jun 14, 2021

Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

# trying to reindex on an axis with duplicates
if not self._index_as_unique and len(indexer):
raise ValueError("cannot reindex from a duplicate axis")
raise ValueError("Cannot reindex on an axis with duplicate labels")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's common practice not to use capitalization

SyntaxError: invalid syntax
IndexError: list index out of range
IndentationError: unexpected indent
IndentationError: expected an indented block

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree. @aberres can you update & ping on green.

# trying to reindex on an axis with duplicates
if not self._index_as_unique and len(indexer):
raise ValueError("cannot reindex from a duplicate axis")
raise ValueError("Cannot reindex on an axis with duplicate labels")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree. @aberres can you update & ping on green.

@jreback jreback added the Error Reporting Incorrect or improved errors from pandas label Jun 15, 2021
@aberres
Copy link
Contributor Author

aberres commented Jun 16, 2021

@jreback Updated. Not green, but the failing check seems unrelated?

@simonjayhawkins
Copy link
Member

@jreback Updated. Not green, but the failing check seems unrelated?

should now be fixed

@simonjayhawkins
Copy link
Member

i'll merge with a 1.4 milestone. but a trivial change so could backport.

@simonjayhawkins simonjayhawkins added this to the 1.4 milestone Jun 16, 2021
@simonjayhawkins simonjayhawkins merged commit be41c04 into pandas-dev:master Jun 16, 2021
@simonjayhawkins
Copy link
Member

Thanks @aberres

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Error Reporting Incorrect or improved errors from pandas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Clarify error message when reindexing on an axis containing duplicates

4 participants