code: def test_kernel_shap_with_dataframe(random_seed):
      """Test with a Pandas DataFrame."""
      rs = np.random.RandomState(random_seed)
  
      df_X = pd.DataFrame(rs.random((10, 3)), columns=list("abc"))
      df_X.index = pd.date_range(
          "2018-01-01", periods=10, freq="D", tz="UTC"
      )
  
      df_y = df_X.eval("a - 2 * b + 3 * c")
      df_y = df_y + rs.normal(0.0, 0.1, df_y.shape)
  
      linear_model = sklearn.linear_model.LinearRegression()
      linear_model.fit(df_X, df_y)
  
      explainer = shap.KernelExplainer(
          linear_model.predict, df_X, keep_index=True
      )
      _ = explainer.shap_values(df_X)
  
file_path: shap/tests/explainers/test_kernel.py
imports: import numpy
  import pandas
  import scipy.sparse
  import sklearn
  import shap
label_desc: Use image node_id 6 for calling a global function with example usage: test_kernel_shap_with_dataframe(random_seed) without return types