class_docstr: Represents a Pandas DataFrame for use with MLflow Tracking.
class_docstr_tok: ["Represents","a","Pandas","DataFrame","for","use","with","MLflow","Tracking","."]
docstr: Args:
      df: A pandas DataFrame.
      source: The source of the pandas DataFrame.
      targets: The name of the target column. Optional.
      name: The name of the dataset. E.g. "wiki_train". If unspecified, a name is
          automatically generated.
      digest: The digest (hash, fingerprint) of the dataset. If unspecified, a digest
          is automatically computed.
      predictions: Optional. The name of the column containing model predictions,
          if the dataset contains model predictions. If specified, this column
          must be present in the dataframe (``df``).
docstr_tok: ["Args",":","df",":","A","pandas","DataFrame",".","source",":","The","source","of","the","pandas","DataFrame",".","targets",":","The","name","of","the","target","column",".","Optional",".","name",":","The","name","of","the","dataset",".","E.g",".","``","wiki_train","''",".","If","unspecified",",","a","name","is","automatically","generated",".","digest",":","The","digest","(","hash",",","fingerprint",")","of","the","dataset",".","If","unspecified",",","a","digest","is","automatically","computed",".","predictions",":","Optional",".","The","name","of","the","column","containing","model","predictions",",","if","the","dataset","contains","model","predictions",".","If","specified",",","this","column","must","be","present","in","the","dataframe","(","``","df","``",")","."]
code: def __init__(
      self,
      df: pd.DataFrame,
      source: DatasetSource,
      targets: Optional[str] = None,
      name: Optional[str] = None,
      digest: Optional[str] = None,
      predictions: Optional[str] = None,
  ):
      """
      Args:
          df: A pandas DataFrame.
          source: The source of the pandas DataFrame.
          targets: The name of the target column. Optional.
          name: The name of the dataset. E.g. "wiki_train". If unspecified, a name is
              automatically generated.
          digest: The digest (hash, fingerprint) of the dataset. If unspecified, a digest
              is automatically computed.
          predictions: Optional. The name of the column containing model predictions,
              if the dataset contains model predictions. If specified, this column
              must be present in the dataframe (``df``).
      """
      if targets is not None and targets not in df.columns:
          raise MlflowException(
              f"The specified pandas DataFrame does not contain the specified targets column"
              f" '{targets}'.",
              INVALID_PARAMETER_VALUE,
          )
      if predictions is not None and predictions not in df.columns:
          raise MlflowException(
              f"The specified pandas DataFrame does not contain the specified predictions column"
              f" '{predictions}'.",
              INVALID_PARAMETER_VALUE,
          )
      self._df = df
      self._targets = targets
      self._predictions = predictions
      super().__init__(source=source, name=name, digest=digest)
  
imports: import json
  import logging
  from functools import cached_property
  from typing import Any, Dict, Optional, Union
  import pandas
  from mlflow.data.dataset import Dataset
  from mlflow.data.dataset_source import DatasetSource
  from mlflow.data.digest_utils import compute_pandas_digest
  from mlflow.data.pyfunc_dataset_mixin import PyFuncConvertibleDatasetMixin, PyFuncInputsOutputs
  from mlflow.exceptions import MlflowException
  from mlflow.models.evaluation.base import EvaluationDataset
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.types import Schema
  from mlflow.types.utils import _infer_schema
  from mlflow.utils.annotations import experimental
label_desc: Use image node_id 1 to create a new PandasDataset object from inherited base classes: Dataset, PyFuncConvertibleDatasetMixin with example: obj = PandasDataset(df, source, targets, name, digest, predictions)