-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
StopIteration error when trying to import specific columns from Excel file using parse_cols #9002
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
Comments
create a csv and try to parse, then show what you have. |
This worked using usecols parameter: Not sure how this is relevant to my read_excel problem. Also, not sure why we have parse_cols for read_excel() versus usecols for read_csv(), but I see there is already an issue created for parameter name inconsistency. |
it could be a bug. Interested in looking at it? |
@jreback Sorry, wish I could. But admittedly, my Python knowledge is not that great. Been using Python for a few years as a data analyst, but I have not personally created a large project or debugged a large project before. |
Just FYI I am having exactly the same problem with pandas 0.17.1 |
@cardosan Sorry but the file you uploaded cannot reproduce this bug on master now. Could you please verify the bug using you own environment and paste your results here? import pandas as pd
df = pd.read_csv("010215_BAU45_SUMMARY_GIU_tot_dem_codes.xls")
pd.__version__ Here is my results running on most recent master code (up to commit fe584e7) In [1]: import pandas as pd
In [2]: df=pd.read_excel("C:/D/tmp/010215_BAU45_SUMMARY_GIU_tot_dem_codes.xls")
# It successfully completed.
In [3]: pd.__version__
Out[3]: '0.18.0rc1+47.gfe584e7' And using 0.17.1 on MY computer In [1]: import pandas as pd
In [2]: df=pd.read_excel("C:/D/tmp/010215_BAU45_SUMMARY_GIU_tot_dem_codes.xls")
# It successfully completed on my computer
In [3]: pd.__version__
Out[3]: '0.17.1' |
The prob is not when I just read the file but when explicitly call parse_cols, see below
|
Documentation says the following:
parse_cols : int or list, default None
Also did:
But still got the same error.
The text was updated successfully, but these errors were encountered: