set nan value pandas code example Example 1: how to replace nan values with 0 in pandas df.fillna(0) Example 2: pandas nan values in column df['your column name'].isnull()