return all non-nan columns pandas code example Example: python select columns with no na df = df[df.columns[~df.isnull().all()]]