Skip to content

Instantly share code, notes, and snippets.

@shravankumar147
Created December 4, 2017 13:57
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 shravankumar147/fa4266336e123a909eea61ec8a9d9e38 to your computer and use it in GitHub Desktop.
Save shravankumar147/fa4266336e123a909eea61ec8a9d9e38 to your computer and use it in GitHub Desktop.
Convert categorical label to integers
iris["Species"] = iris["Species"].map({"Iris-setosa":0,"Iris-virginica":1,"Iris-versicolor":2})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment