Create Dummy Variables with Pandas

Python

 1|  import pandas as pd
 2|  X = pd.get_dummies(X, columns=['neighbourhood_group','room_type'], drop_first=True)
Did you find this snippet useful?

Sign up for free to to add this to your code library