class_docstr: ClassificationReport visualizer tests
class_docstr_tok: ["ClassificationReport","visualizer","tests"]
docstr: Test with Pandas DataFrame and Series input
docstr_tok: ["Test","with","Pandas","DataFrame","and","Series","input"]
code: def test_pandas_integration(self):
      """
      Test with Pandas DataFrame and Series input
      """
      _, ax = plt.subplots()
  
      # Load the occupancy dataset from fixtures
      data = load_occupancy(return_dataset=True)
      X, y = data.to_pandas()
  
      # Create train/test splits
      splits = tts(X, y, test_size=0.2, random_state=4512)
      X_train, X_test, y_train, y_test = splits
  
      classes = ["unoccupied", "occupied"]
  
      # Create classification report
      model = GaussianNB()
      viz = ClassificationReport(model, ax=ax, classes=classes)
      viz.fit(X_train, y_train)
      viz.score(X_test, y_test)
  
      self.assert_images_similar(viz, tol=5.0)
  
      # Ensure correct classification scores under the hood!
      assert viz.scores_ == {
          "precision": {
              "unoccupied": 0.999347471451876,
              "occupied": 0.8825214899713467,
          },
          "recall": {
              "unoccupied": 0.9613935969868174,
              "occupied": 0.9978401727861771,
          },
          "f1": {
              "unoccupied": 0.9800031994880819,
              "occupied": 0.9366447034972124,
          },
      }
  
imports: import sys
  import pytest
  import yellowbrick
  import matplotlib.pyplot
  from yellowbrick.datasets import load_occupancy
  from yellowbrick.classifier.classification_report import *
  from pytest import approx
  from unittest.mock import patch
  from tests.base import VisualTestCase
  from sklearn.svm import LinearSVC, SVC
  from sklearn.naive_bayes import GaussianNB
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.datasets import make_classification
  from sklearn.model_selection import train_test_split
  from sklearn.linear_model import LassoCV, LogisticRegression
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import MinMaxScaler
label_desc: Use image node_id 3 for calling the TestClassificationReport obj's underlying member method code with example usage: obj.test_pandas_integration() without return types