pandas replace 0 with false and 1 with true code example Example: pandas replace nulls with zeros df['col1'] = df['col1'].fillna(0)