Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created November 21, 2020 06:29
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 amankharwal/c1075fa8716f1fc028ba4830babae6ac to your computer and use it in GitHub Desktop.
Save amankharwal/c1075fa8716f1fc028ba4830babae6ac to your computer and use it in GitHub Desktop.
attrition = attrition.drop(['Attrition_numerical'], axis=1)
# Empty list to store columns with categorical data
categorical = []
for col, value in attrition.iteritems():
if value.dtype == 'object':
categorical.append(col)
# Store the numerical columns in a list numerical
numerical = attrition.columns.difference(categorical)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment