improved exception message
State: closed

for ValueError: cannot reindex from a duplicate axis

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Stale

Comments:
Hello @nickmccullum! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/core/indexes/base.py`](https://github.com/pandas-dev/pandas/blob/ac4b0ebbdcbd93529f8311bae7ce13b7dc7845b0/pandas/core/indexes/base.py):

> [Line 3273:9](https://github.com/pandas-dev/pandas/blob/ac4b0ebbdcbd93529f8311bae7ce13b7dc7845b0/pandas/core/indexes/base.py#L3273): [E112](https://duckduckgo.com/?q=pep8%20E112) expected an indented block
> [Line 3278:1](https://github.com/pandas-dev/pandas/blob/ac4b0ebbdcbd93529f8311bae7ce13b7dc7845b0/pandas/core/indexes/base.py#L3278): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 3279:13](https://github.com/pandas-dev/pandas/blob/ac4b0ebbdcbd93529f8311bae7ce13b7dc7845b0/pandas/core/indexes/base.py#L3279): [E113](https://duckduckgo.com/?q=pep8%20E113) unexpected indentation



##### Comment last updated at 2020-09-06 11:13:13 UTC
@nickmccullum can you address comments?
@simonjayhawkins Just addressed the comments. Sorry for the delay. Thanks Simon :) 
Thanks @nickmccullum for updating

ci is failing with 
```
##[error]pandas/tests/frame/test_axis_select_reindex.py:284:        msg = """cannot reindex from a duplicate axis  <- trailing whitespaces found
##[error]pandas/tests/frame/test_axis_select_reindex.py:285:        (this usually occurs when trying to join / assign  <- trailing whitespaces found
```

@simonjayhawkins just fixed!
@nickmccullum I think you need to change the error message itself, it seems you've modified only the associated test (which is causing the failures).
@nickmccullum is this still active? If so can you address @dsaxton  comment?
Yes, this is still active. Sorry for the late reply. @dsaxton can you be more specific about what you mean? I looked at my commits and I believe that I only changed the error message (not the commits).
> Yes, this is still active. Sorry for the late reply. @dsaxton can you be more specific about what you mean? I looked at my commits and I believe that I only changed the error message (not the commits).

@nickmccullum This is modifying the expected error message within the test, but you need to change the _actual_ error message for reindex
> > Yes, this is still active. Sorry for the late reply. @dsaxton can you be more specific about what you mean? I looked at my commits and I believe that I only changed the error message (not the commits).
> 
> @nickmccullum This is modifying the expected error message within the test, but you need to change the _actual_ error message for reindex

Where should I look to see the actual error message? 
> Where should I look to see the actual error message?

https://github.com/pandas-dev/pandas/blob/9ad63636cad78b6cfbbdb240c1dfcb72158eeb69/pandas/core/indexes/base.py#L3339
> > Where should I look to see the actual error message?
> 
> https://github.com/pandas-dev/pandas/blob/9ad63636cad78b6cfbbdb240c1dfcb72158eeb69/pandas/core/indexes/base.py#L3339

Ok, and do I need to keep my previous change or discard it?
> Ok, and do I need to keep my previous change or discard it?

Yes you'll want to keep both
@dsaxton I think this should be good to go now :) thanks for helping me with this
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.
@nickmccullum Can you address the comments and merge master?
Closing for now. @nickmccullum ping us whenever you'd like to continue and we'll reopen!