Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created January 22, 2021 14:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AyishaR/6f7b939b3c0ab37ecd90813a0cf0b1db to your computer and use it in GitHub Desktop.
df80 = pd.get_dummies(df['x80'], drop_first = True, prefix = '80')
for column in df80.columns:
df[column] = df80[column]
df = df.drop(columns = ['x80'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment