class_docstr: Represents a Pandas DataFrame for use with MLflow Tracking.
class_docstr_tok: ["Represents","a","Pandas","DataFrame","for","use","with","MLflow","Tracking","."]
docstr: Converts the dataset to a collection of pyfunc inputs and outputs for model
  evaluation. Required for use with mlflow.evaluate().
docstr_tok: ["Converts","the","dataset","to","a","collection","of","pyfunc","inputs","and","outputs","for","model","evaluation",".","Required","for","use","with","mlflow.evaluate","(",")","."]
code: def to_pyfunc(self) -> PyFuncInputsOutputs:
      """
      Converts the dataset to a collection of pyfunc inputs and outputs for model
      evaluation. Required for use with mlflow.evaluate().
      """
      if self._targets:
          inputs = self._df.drop(columns=[self._targets])
          outputs = self._df[self._targets]
          return PyFuncInputsOutputs(inputs, outputs)
      else:
          return PyFuncInputsOutputs(self._df)
  
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 10 for calling the PandasDataset obj's underlying member method code with example usage: obj.to_pyfunc() and returns: PyFuncInputsOutputs, PyFuncInputsOutputs