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

read_csv, read_table in version 0.9.0 are parsing integers as double but reporting type as int64 #3258

Closed
nisaggarwal opened this issue Apr 4, 2013 · 1 comment

Comments

@nisaggarwal
Copy link

commented Apr 4, 2013

For example a file containing the text below, read using:

>>> pandas.read_csv("file.log")

produces the following output:

             Numbers
0  17007000002000192
1  17007000002000192
2  17007000002000192
3  17007000002000192
4  17007000002000192
5  17007000002000192
6  17007000002000192
7  17007000002000192
8  17007000002000192
9  17007000002000194

>> numpy.spacing(17007000002000192)

is 2.0 for this range of numbers

but the type reported for the value is int64 not double/float64

file.log contains:

Numbers
17007000002000191
17007000002000191
17007000002000191
17007000002000191
17007000002000192
17007000002000192
17007000002000192
17007000002000192
17007000002000192
17007000002000194
@wesm

This comment has been minimized.

Copy link
Member

commented Apr 8, 2013

This works in 0.10.1 and git master, recommend you update

In [3]: read_clipboard()
Out[3]: 
             Numbers
0  17007000002000191
1  17007000002000191
2  17007000002000191
3  17007000002000191
4  17007000002000192
5  17007000002000192
6  17007000002000192
7  17007000002000192
8  17007000002000192
9  17007000002000194

However, it's broken with the "python parser" (engine='python'). Let me look into this quickly.

@wesm wesm closed this in 6b5ee26 Apr 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.