Even though doc says:
downcast : dict, default is None
a dict of item- > dtype , , , "infer", (, float64 int64, )
dict downcast, AssertionError("dtypes as dict is not supported yet")
downcast='infer', pandas , , float . : 10000, .
In [1]: import pandas as pd
...: import numpy as np
...: df = pd.DataFrame([[3.14,9999.9,10000.1,200000.2],[2.72,9999.9,10000.1,300000.3]], columns=list("ABCD"))
...: df.dtypes
...:
Out[1]:
A float64
B float64
C float64
D float64
dtype: object
In [2]: df
Out[2]:
A B C D
0 3.14 9999.9 10000.1 200000.2
1 2.72 9999.9 10000.1 300000.3
In [3]: dff=df.fillna(0, downcast='infer')
...: dff.dtypes
...:
Out[3]:
A float64
B float64
C int64
D int64
dtype: object
In [4]: dff
Out[4]:
A B C D
0 3.14 9999.9 10000 200000
1 2.72 9999.9 10000 300000