Skip to content

Instantly share code, notes, and snippets.

@ShrashtiSinghal
Created August 6, 2020 17:48
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 ShrashtiSinghal/7797dba8ea689aa4f1c4fa81c34ac7dd to your computer and use it in GitHub Desktop.
Save ShrashtiSinghal/7797dba8ea689aa4f1c4fa81c34ac7dd to your computer and use it in GitHub Desktop.
#Log Transformation to remove skewness
y = np.log1p(y)
for col in x.columns:
if np.abs(x[col].skew()) > 0.3:
x[col] = np.log1p(x[col])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment