Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #Separate categorical and numerical columns in dataframe
  2. X_categorical = X.select_dtypes(exclude=['int', 'float'])
  3. X_numerical = X.select_dtypes(include=['int', 'float'])
  4.  
  5. X_to_predict_categorical = X_to_predict.select_dtypes(exclude=['int', 'float'])
  6. X_to_predict_numerical = X_to_predict.select_dtypes(include=['int', 'float'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement