Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/hotel.py Secret

Created Feb 13, 2021
Embed
What would you like to do?
def impute(column):
column = column[0]
if (type(column) != list):
return "".join(literal_eval(column))
else:
return column
data["Tags"] = data[["Tags"]].apply(impute, axis=1)
data.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment