There is already a column called "Imovel", I want to create a new column classifying as "House" or "Apartment"
I want to create a new column by classifying the properties according to their respective name. But he doesn't create the column, I'd like to know where I'm going. I'm learning Python.
selection = ['House', 'Beach House', 'Rest House']
def immobile():
index = 0
for type in data. Immovel:
if(type == selection):
data["Type"][index] = 'House'
else:
data["Type"][index] = 'Apartment'
index = index + 1
data.head()