wesm/pandas — Issue #603: When reading data with read_table, columns with ints and NAs are turned into floats
Author: cswegger
Created: 2012-01-10 08:31:18+00:00
State: open

Minimal case:

ID Data
1 45.0
NA NA
2 34

I use read_clipboard in this example, but it affects also read_table

````python

In [4]: pandas.read_clipboard(sep="\s+")
Out[4]:
ID Data
0 1.0 45.
1 NaN NaN
2 2.0 34.

In [9]: pandas.read_clipboard(sep="\s+").dtypes
Out[9]:
ID float64
Data float64
````

Is this working as intended? I ended up writing a wrapper to pandas.read_table to work around this issue (I tried writing a converter function, but it fails with the NAs).