Skip to content

Instantly share code, notes, and snippets.

@Shikhargupta
Created May 11, 2020 19:06
Show Gist options
  • Select an option

  • Save Shikhargupta/26ad254a858a7bb8b5a6d95e824fa0f8 to your computer and use it in GitHub Desktop.

Select an option

Save Shikhargupta/26ad254a858a7bb8b5a6d95e824fa0f8 to your computer and use it in GitHub Desktop.
#Square
for col in poly_cols:
df_cum[col + '_square'] = df_cum[col]**2
#Cube
for col in poly_cols:
df_cum[col + '_cube'] = df_cum[col]**3
#Square root
for col in poly_cols:
df_cum[col + '_sqrt'] = df_cum[col]**0.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment