use lambda to get average of dataframe without nsn values code example Example: fill missing values in column pandas with mean df.fillna(df.mean(), inplace=True)