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.
class_docstr_tok: ["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: Prepares user defined test input(s) for DiCE.
docstr_tok: ["Prepares","user","defined","test","input","(","s",")","for","DiCE","."]
code: def prepare_query_instance(self, query_instance):
      """Prepares user defined test input(s) for DiCE."""
      test = self.query_instance_to_df(query_instance)
      test = test.reset_index(drop=True)
      # encode categorical and numerical columns
      test = self._set_feature_dtypes(
          test,
          self.categorical_feature_names,
          self.continuous_feature_names,
      )
      return test
  
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 26 for calling the PublicData obj's underlying member method code with example usage: obj.prepare_query_instance(query_instance) and returns: test