Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created March 12, 2020 06:54
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 aniruddha27/516c274e199064dddf5e974f3f08f6dc to your computer and use it in GitHub Desktop.
Save aniruddha27/516c274e199064dddf5e974f3f08f6dc to your computer and use it in GitHub Desktop.
df2 = df.copy()
df2['Age_at_joining'] = df.apply(lambda x: x['Age'] - x['Years of service'],axis=1)
X = df2.drop(['Age','Years of service','Salary'],axis=1)
calc_vif(X)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment