code: def explain_prediction_df(estimator, doc, **kwargs):
      # type: (...) -> pd.DataFrame
      """Explain prediction and export explanation to ``pandas.DataFrame``
      All keyword arguments are passed to :func:`eli5.explain_prediction`.
      Weights of all features are exported by default.
      """
      kwargs = _set_defaults(kwargs)
      return format_as_dataframe(
          eli5.explain_prediction(estimator, doc, **kwargs)
      )
  
file_path: eli5/eli5/formatters/as_dataframe.py
imports: from itertools import chain
  from typing import Any, Dict, List, Optional
  import warnings
  import pandas
  import eli5
  from eli5.base import Explanation, FeatureImportances, TargetExplanation, TransitionFeatureWeights
  from eli5.base_utils import singledispatch
label_desc: Use image node_id 3 for calling a global function with example usage: explain_prediction_df(estimator, doc) and returns: format_as_dataframe