class_docstr: StringEncoder transform.
  The transform will cast everything to a
  string and the inverse transform will cast to the type defined in dtype.
class_docstr_tok: ["StringEncoder","transform",".","The","transform","will","cast","everything","to","a","string","and","the","inverse","transform","will","cast","to","the","type","defined","in","dtype","."]
docstr: Fit a list or array of categories. All elements must be from the
  same type.
  
  Parameters
  ----------
  X : array-like, shape=(n_categories,)
      List of categories.
docstr_tok: ["Fit","a","list","or","array","of","categories",".","All","elements","must","be","from","the","same","type",".","Parameters","--","--","--","--","--","X",":","array-like",",","shape=","(","n_categories",",",")","List","of","categories","."]
code: def fit(self, X):
      """Fit a list or array of categories. All elements must be from the
      same type.
  
      Parameters
      ----------
      X : array-like, shape=(n_categories,)
          List of categories.
      """
      if len(X) > 0:
          self.dtype = type(X[0])
  
imports: from __future__ import division
  import numpy
  from sklearn.preprocessing import LabelBinarizer
  from sklearn.utils import column_or_1d
label_desc: Use image node_id 2 for calling the StringEncoder obj's underlying member method code with example usage: obj.fit(X) without return types