I have a DataFrame in pandas where some of the numbers are expressed in scientific notation (or exponent notation) like this:
id val
Your data is probably object dtype. This is a direct copy/paste of your data. read_csv interprets it as the correct dtype. You should normally only have object dtype on string-like fields.
In [5]: df = read_csv(StringIO(data),sep='\s+')
In [6]: df
Out[6]:
id value
id 1.00 -0.422000
value -0.42 1.000000
percent -0.72 0.100000
played 0.03 -0.043500
money -0.22 0.337000
other NaN NaN
sy -0.03 0.000219
sz -0.33 0.383000
check if your dtypes are object
In [7]: df.dtypes
Out[7]:
id float64
value float64
dtype: object
This converts this frame to object dtype (notice the printing is funny now)
In [8]: df.astype(object)
Out[8]:
id value
id 1 -0.422
value -0.42 1
percent -0.72 0.1
played 0.03 -0.0435
money -0.22 0.337
other NaN NaN
sy -0.03 0.000219
sz -0.33 0.383
This is how to convert it back (astype(float)) also works here
In [9]: df.astype(object).convert_objects()
Out[9]:
id value
id 1.00 -0.422000
value -0.42 1.000000
percent -0.72 0.100000
played 0.03 -0.043500
money -0.22 0.337000
other NaN NaN
sy -0.03 0.000219
sz -0.33 0.383000
This is what an object dtype frame would look like
In [10]: df.astype(object).dtypes
Out[10]:
id object
value object
dtype: object