df fill na code example Example 1: dataframe fillna with 0 df['column'] = df['column'].fillna(0) Example 2: how to replace nan values with 0 in pandas df.fillna(0)