class_docstr: Test FeatureImportances visualizer
docstr: Ensure feature names are extracted from DataFrame columns
docstr_tok: ["Ensure","feature","names","are","extracted","from","DataFrame","columns"]
code: def test_fit_dataframe(self):
      """
      Ensure feature names are extracted from DataFrame columns
      """
      labels = ["a", "b", "c", "d", "e", "f"]
      df = pd.DataFrame(np.random.rand(100, 6), columns=labels)
      s = pd.Series(np.random.rand(100), name="target")
  
      assert df.shape == (100, 6)
  
      model = MockEstimator()
      model.make_importance_param(value=np.linspace(0, 1, 6))
  
      visualizer = FeatureImportances(model)
      visualizer.fit(df, s)
  
      assert hasattr(visualizer, "features_")
      npt.assert_array_equal(visualizer.features_, np.array(df.columns))
  
imports: import pytest
  import numpy
  import numpy.testing
  import matplotlib.pyplot
  from yellowbrick.exceptions import NotFitted
  from yellowbrick.model_selection.importances import *
  from yellowbrick.datasets import load_occupancy, load_concrete
  from sklearn.datasets import load_iris
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.ensemble import GradientBoostingClassifier
  from sklearn.base import BaseEstimator, ClassifierMixin
  from sklearn.linear_model import LogisticRegression, Lasso
  from sklearn.impute import SimpleImputer
  from sklearn.pipeline import Pipeline
  from unittest import mock
  from tests.base import VisualTestCase
label_desc: Use image node_id 12 for calling the TestFeatureImportancesVisualizer obj's underlying member method code with example usage: obj.test_fit_dataframe() without return types