code: def _df_to_array(instances):
      """
      Transform inputs into arrays
  
      Parameters
      ----------
      instances : DataFrame, Series or array
          Input data
  
      Returns
      -------
      instances : array
          Transformed features
      """
      if isinstance(instances, pd.DataFrame):
          return instances.values
      elif isinstance(instances, pd.Series):
          return np.array([instances.values])
      else:
          return instances
  
file_path: shapash/shapash/utils/explanation_metrics.py
imports: import numpy
  import pandas
  from sklearn.preprocessing import normalize
label_desc: Use image node_id 1 for calling a global function with example usage: _df_to_array(instances) and returns: instances, np, instances