woodsja

change column types

Sep 12th, 2018
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.16 KB | None | 0 0
  1. for dataset in full_data:
  2.     for k, label in enumerate(train['MSZoning'].unique()):
  3.         dataset['MSZoning'] = dataset['MSZoning'].map({label: k}).astype(int)
Advertisement
Add Comment
Please, Sign In to add comment