Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created February 13, 2021 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/9fd28f6ee8765e86034c9de1961f47f1 to your computer and use it in GitHub Desktop.
Save amankharwal/9fd28f6ee8765e86034c9de1961f47f1 to your computer and use it in GitHub Desktop.
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()
@HLC86
Copy link

HLC86 commented Mar 24, 2022

when I run this script, it shows: IndentationError: unexpected indent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment