Guest User

Untitled

a guest
Dec 15th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. # Get the columns with > 50% missing
  2. missing_df = missing_values_table(df_train);
  3. missing_columns = list(missing_df[missing_df['% of Total Values'] > 50].index)
  4. print('\n','%d columns will be deleted.' % len(missing_columns))
  5.  
  6. # Drop the columns with 50% missing data
  7. df_train = df_train.drop(columns = list(missing_columns))
Add Comment
Please, Sign In to add comment