I have a dataframe with nans in it:
>>>df.head() Out[1]: JPM US SMALLER COMPANIES C ACC 1990-01-02 NaN 1990
you need inplace
inplace
df[1].fillna(0, inplace=True)