python pandas csv fill NaN values code example Example: how to fill nan values with mean in pandas df.fillna(df.mean())