how to replace nan with 0 in python list code example Example: dataframe fillna with 0 df['column'] = df['column'].fillna(0)