O'Reilly logo
  • Michael Williams thinks this is interesting:

LabelBinarizer

From

Cover of Hands-On Machine Learning with Scikit-Learn and TensorFlow

Note

Does not work if there are only 2 categories - http://stackoverflow.com/questions/31947140/sklearn-labelbinarizer-returns-vector-when-there-are-2-classes