Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created March 27, 2021 07:32
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 AyishaR/d73a44399232c91b7c630d1358a06966 to your computer and use it in GitHub Desktop.
Save AyishaR/d73a44399232c91b7c630d1358a06966 to your computer and use it in GitHub Desktop.
df = pd.get_dummies(df, columns = ['refill gas'], dummy_na = True)
df = pd.get_dummies(df, columns = ['gas_type'], drop_first=True)
df = df.drop(columns = ['specials','refill gas_nan'], axis = 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment