how to fill nan with most occured data in pandas code example Example: how to fill nan values with mean in pandas df.fillna(df.mean())