extract nan columns from a dataframe into a new df code example Example: pandas nan values in column df['your column name'].isnull()