replace none with 0 in python pandas code example Example: pandas replace nulls with zeros df['col1'] = df['col1'].fillna(0)