code: def prepare_x(all_profiles, variable_type):
      # create _x_
      for variable in all_profiles["_vname_"].unique():
          where_variable = all_profiles["_vname_"] == variable
          all_profiles.loc[where_variable, "_x_"] = all_profiles.loc[
              where_variable, variable
          ]
  
      # change x column to proper character values
      if variable_type == "categorical":
          all_profiles.loc[:, "_x_"] = all_profiles.apply(
              lambda row: str(row[row["_vname_"]]), axis=1
          )
  
      return all_profiles
  
file_path: DALEX/python/dalex/dalex/model_explanations/_aggregated_profiles/utils.py
imports: import numpy
  import pandas
  from tqdm import tqdm
label_desc: Use image node_id 5 for calling a global function with example usage: prepare_x(all_profiles, variable_type) and returns: all_profiles