-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
pandas not loading the csv/tsv completely #23533
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
@bicepjai : Hello, thanks for reporting the issue! Unfortunately, we cannot help you too much if you are unable to share the data that you used. If you can provide a dataset that can reproduce your problem, that would be great. |
Sorry , its sensitive data I cannot share. But I hope the behavior I have shared might help with identifying the issue. |
@bicepjai : Per our policy, we need a reproducible example for us to debug your problem. Without a dataset, we cannot reproduce your issue (especially on a codebase of this size). Closing for now, but if you have time, I recommend you try to recreate a dataset with the same shape and data types as the one you have and see if you can still reproduce. If you are able, please ping, and we can revisit! |
@gfyoung thanks, I understand. I think its file encoding issue. but if tableau can handle the issue, so should OUR pandas. I will try and get a sharable dataset that produces similar issue. |
I think the issue was because of similar one discussed here solution was to use quoting |
Code Sample, a copy-pastable example if possible
Problem description
I have a file for analysis and it gets loaded only partially. I cannot share the file. This doesn't happen with all the files. Even with error_bad_lines=True, nothing is reported. No warning messages either. If I run
wc -l filename.tsv
I get the exact number of lines in file, this doesn't match the rows reported in pandas. Tableau parses the file properly.Note: I spent lot of time in trying to understand the behavior and lost the bet saying tableau was erroneous :(
Behaviour
I tried a lot of different options to find out what behavior causes the issue.
After I converted the tsv to csv using
and then use the following piece of code, I was able to read in the whole file.
Please note ignoring the
sep='\t'
loaded only partial fileExpected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.7.final.0
python-bits: 64
OS: Darwin
OS-release: 18.2.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.23.4
pytest: 3.8.2
pip: 18.1
setuptools: 40.4.3
Cython: None
numpy: 1.15.2
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.0.1
sphinx: None
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.5
blosc: None
bottleneck: None
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 3.0.0
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: