class_docstr: A data interface for public data. This class is an interface to DiCE explainers
  and contains methods to transform user-fed raw data into the format a DiCE explainer
  requires, and vice versa.
docstr: 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 feat in self.categorical_feature_names:
          # first, derive column names in the one-hot-encoded data from the original data
          cat_col_values = []
          for val in list(self.data_df[feat].unique()):
              cat_col_values.append(
                  feat + prefix_sep + str(val)
              )  # join original feature name and its unique values , ex: education_school
          match_cols = [
              c for c in data.columns if c in cat_col_values
          ]  # check for the above matching columns in the encoded data
  
          # then, recreate original data by removing the suffixes - based on the GitHub issue comment:
          # https://github.com/pandas-dev/pandas/issues/8745#issuecomment-417861271
          cols, labs = [
              [c.replace(x, "") for c in match_cols]
              for x in ["", feat + prefix_sep]
          ]
          out[feat] = pd.Categorical(
              np.array(labs)[np.argmax(data[cols].values, axis=1)]
          )
          out.drop(cols, axis=1, inplace=True)
      return out
  
imports: import logging
  from collections import defaultdict
  import numpy
  import pandas
  from raiutils.exceptions import UserConfigValidationException
  from sklearn.preprocessing import LabelEncoder
  from dice_ml.data_interfaces.base_data_interface import _BaseData
  from dice_ml.utils.exception import SystemException
label_desc: Use image node_id 22 for calling the PublicData obj's underlying member method code with example usage: obj.from_dummies(data, prefix_sep) and returns: out