Skip to content
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

BUG: read_csv (c engine, round_trip precision) platform inconsistency with large exponents #38794

Open
mzeitlin11 opened this issue Dec 30, 2020 · 1 comment
Labels
Bug IO CSV read_csv, to_csv Linux Linux OS OS X Related to Mac OS & hardware issues (M1)

Comments

@mzeitlin11
Copy link
Member

mzeitlin11 commented Dec 30, 2020

On OS X

data = io.StringIO("data\n10E999")
pd.read_csv(data, engine="c", float_precision="round_trip")

gives

   data
0   inf

But on Linux this gives

     data
0  10E999

Is this expected for any reason?

@mzeitlin11 mzeitlin11 added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 30, 2020
@mzeitlin11 mzeitlin11 changed the title BUG: read_csv (c engine, round-trip precision) platform inconsistency with large exponents BUG: read_csv (c engine, round_trip precision) platform inconsistency with large exponents Dec 30, 2020
@mzeitlin11 mzeitlin11 reopened this Dec 30, 2020
@mzeitlin11 mzeitlin11 added IO CSV read_csv, to_csv Linux Linux OS labels Dec 30, 2020
@phofl
Copy link
Member

phofl commented Feb 21, 2021

The following is in the same place:

s = """
Col1,Col2
a1,50060e8007123400
a2,50060e8007123400
a3,50060e8007123400
a4,50060e8007123402
a5,50060e8007123402
a6,50060e8007123402
a7,50060e8007123402
a8,50060e8007123402
a9,50060e8007123404
a10,50060e8007123404
"""

output_csv = pd.read_csv(StringIO(s))

returns

  Col1  Col2
0   a1   0.0
1   a2   0.0
2   a3   0.0
3   a4   0.0
4   a5   0.0
5   a6   0.0
6   a7   0.0
7   a8   0.0
8   a9   0.0
9  a10   0.0

@mroeschke mroeschke added the OS X Related to Mac OS & hardware issues (M1) label Aug 14, 2021
@mroeschke mroeschke removed the Needs Triage Issue that has not been reviewed by a pandas team member label Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO CSV read_csv, to_csv Linux Linux OS OS X Related to Mac OS & hardware issues (M1)
Projects
None yet
Development

No branches or pull requests

3 participants