You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect header inference to work properly and return a dataframe with 4 rows here. See data.table R package for a working header inference implementation[1].
The text was updated successfully, but these errors were encountered:
gokceneraslan
changed the title
header='infer' is not working properly if there is no header
header='infer' is not working if there is no header
Sep 9, 2017
gokceneraslan
changed the title
header='infer' is not working if there is no header
header='infer' is not working when there is no header
Sep 9, 2017
@gokceneraslan : Thanks for this report! This is a documentation issue. When you pass in infer, that is interpreted as there being a header available. For round-trip, you should pass in header=None.
Nevertheless, the documentation for the header parameter could be improved to make these behaviors clearer to the user. PR is welcome!
Code Sample
Output
Pandas cannot infer that there is no header in csv files even though I use
header='infer'
argument inread_csv
.Expected Output
I expect header inference to work properly and return a dataframe with 4 rows here. See
data.table
R package for a working header inference implementation[1].Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.2.final.0
python-bits: 64
OS: Darwin
OS-release: 16.7.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.20.3
pytest: 3.2.1
pip: 9.0.1
setuptools: 27.2.0
Cython: 0.26
numpy: 1.13.1
scipy: 0.19.1
xarray: None
IPython: 6.1.0
sphinx: None
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: