-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
truncation issue with pd.read_csv #7072
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
btw, when i say orig = pd.read_csv('orig.piece',dtype=str), the problem goes away. But, is there any downside to this? also, this sounds like a workaround and not a fix. |
this is the user responsibility; reading in as |
related #2511 |
I can't reproduce this anymore, using pandas 0.23.4
|
Could use a regression test. |
hi, thank you very much for the awesome pandas tool. I would like to report an issue i noticed and seek guidance on remedial steps. When i store a long integer into a file using pd.to_csv, it stores the data fine - but when i read it back using pd.read_csv, it messes with the last 3 digits. When i try to save it back again using to_csv (without any edits), the numbers in resulting CSV file is different from the original CSV file. I've illustrated the problem below (notice how 4321113141090630389 becomes 4321113141090630400 and 4321583677327450765 becomes 4321583677327450880):
original CSV file created by pd.to_csv:
could you please help me understand why read_csv jumbles the last three digits? Its not even a rounding issue, the digits are totally different (like 4321583677327450765 becomes 4321583677327450880 above) Is it because of the scientific notation that comes in the way - how can we disable it and let pandas treat this data as jus object/string or plan integer/float?
The text was updated successfully, but these errors were encountered: