change 0 to null pandas code example Example: pandas replace nulls with zeros df['col1'] = df['col1'].fillna(0)