Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Get the columns with > 50% missing
- missing_df = missing_values_table(df_train);
- missing_columns = list(missing_df[missing_df['% of Total Values'] > 50].index)
- print('\n','%d columns will be deleted.' % len(missing_columns))
- # Drop the columns with 50% missing data
- df_train = df_train.drop(columns = list(missing_columns))
Add Comment
Please, Sign In to add comment