class_docstr: A data interface for private data with meta information.
class_docstr_tok: ["A","data","interface","for","private","data","with","meta","information","."]
docstr: Gets the original data from dummy encoded data with k levels.
docstr_tok: ["Gets","the","original","data","from","dummy","encoded","data","with","k","levels","."]
code: def from_dummies(self, data, prefix_sep="_"):
      """Gets the original data from dummy encoded data with k levels."""
      out = data.copy()
      for feature_name in self.categorical_feature_names:
          cols, labs = [
              [
                  c.replace(x, "")
                  for c in data.columns
                  if feature_name + prefix_sep in c
              ]
              for x in ["", feature_name + prefix_sep]
          ]
          out[feature_name] = pd.Categorical(
              np.array(labs)[np.argmax(data[cols].values, axis=1)]
          )
          out.drop(cols, axis=1, inplace=True)
      return out
  
imports: import collections
  import logging
  import sys
  from collections import defaultdict
  import numpy
  import pandas
  from sklearn.preprocessing import LabelEncoder
  from dice_ml.data_interfaces.base_data_interface import _BaseData
label_desc: Use image node_id 17 for calling the PrivateData obj's underlying member method code with example usage: obj.from_dummies(data, prefix_sep) and returns: out