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