Last active
December 15, 2020 14:26
-
-
Save pm25/9f7775b0cf8aec3fcaf73c367cd81364 to your computer and use it in GitHub Desktop.
Pandas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
def get_columns_with_nan(df): | |
nan_values = df.isna() | |
nan_columns = nan_values.any() | |
columns_with_nan = df.columns[nan_columns].tolist() | |
return columns_with_nan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment