Created
January 8, 2019 01:12
-
-
Save EricSchles/66b41f4a774e723ea3eff2b00f1505d1 to your computer and use it in GitHub Desktop.
This file contains 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
def get_percent_empty(df): | |
listing = list(df.isnull().sum()/df.shape[0] != 0) | |
columns_of_interest = [] | |
cols = df.columns.tolist() | |
for index, col in enumerate(cols): | |
if listing[index]: | |
columns_of_interest.append(col) | |
return df[columns_of_interest].isnull().sum()/df.shape[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment