Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
StopIteration error when trying to import specific columns from Excel file using parse_cols #9002
Comments
|
create a csv and try to parse, then show what you have. |
pybokeh
commented
Dec 5, 2014
|
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
added Bug Excel
labels
Dec 5, 2014
jreback
added this to the
0.16.0
milestone
Dec 5, 2014
pybokeh
commented
Dec 5, 2014
|
@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. |
jreback
modified the milestone: 0.16.0, Next Major Release
Mar 6, 2015
cardosan
commented
Feb 23, 2016
|
Just FYI I am having exactly the same problem with pandas 0.17.1 |
jreback
referenced
this issue
Feb 23, 2016
Closed
Fix #12292 : error when read one empty column from excel file #12296
cardosan
commented
Feb 24, 2016
|
@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' |
jreback
modified the milestone: 0.18.0, Next Major Release
Feb 27, 2016
jreback
closed this
in 78d671f
Feb 27, 2016
cardosan
commented
Feb 29, 2016
|
The prob is not when I just read the file but when explicitly call parse_cols, see below
|
pybokeh commentedDec 4, 2014
Documentation says the following:
parse_cols : int or list, default None
Also did:
But still got the same error.