how to filter only nan values in pandas code example Example: python select columns with no na df = df[df.columns[~df.isnull().all()]]