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: Set the correct type of each feature column.
code: def _set_feature_dtypes(
      self, data_df, categorical_feature_names, continuous_feature_names
  ):
      """Set the correct type of each feature column."""
      if len(categorical_feature_names) > 0:
          for feature in categorical_feature_names:
              data_df[feature] = data_df[feature].apply(str)
          data_df[categorical_feature_names] = data_df[
              categorical_feature_names
          ].astype("category")
  
      if len(continuous_feature_names) > 0:
          for feature in continuous_feature_names:
              if self.get_data_type(feature) == "float":
                  data_df[feature] = data_df[feature].astype(np.float32)
              else:
                  data_df[feature] = data_df[feature].astype(np.int32)
      return data_df
  
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 5 for calling the PublicData obj's underlying member method code with example usage: obj._set_feature_dtypes(data_df, categorical_feature_names, continuous_feature_names) and returns: data_df