set all false values to nan in data frame code example Example: pandas nan values in column df['your column name'].isnull()