Last active
November 6, 2019 12:31
-
-
Save manualbashing/8313cf1a55fbb412de4fe172417eb02f to your computer and use it in GitHub Desktop.
[Missing values statistics for a pandas dataframe] #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
| def missing_values_count(df_train): | |
| tbl = [] | |
| for col in df_train.columns[df_train.isnull().any()]: | |
| tbl.append([col, df_train[col].isnull().sum()]) | |
| return pd.DataFrame(tbl, columns=["column", "missing_values_count"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment