-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
read_csv() doesn't parse correctly when usecols
and parse_dates
are both used
#14792
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
Finally got some time to look at this, and your statement about it happening at random was the key. We unfortunately have flaky behavior on the C engine side. When we determine which columns to not convert because they're being used for First, we initialize
you see you will get different results. The reason why the Python engine does not see this issue is because it prunes columns early on and iterates over the column names, which is a |
Code Sample, a copy-pastable example if possible
Problem description
Since v0.18.1
pd.read_csv()
doesn't parse correctly, and it occurs randomly at every run. It occurs only whenusecols
andparse_dates
are both used.Expected Output
All the columns parsed as int64 and not some randomly as object.
Output of
pd.show_versions()
pandas: 0.19.1
nose: None
pip: 9.0.1
setuptools: 29.0.1.post20161201
Cython: None
numpy: 1.11.2
scipy: None
statsmodels: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2016.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: