class_docstr: FeatureImportances visualizer
class_docstr_tok: ["FeatureImportances","visualizer"]
docstr: Integration test of visualizer with pandas dataframe with string and boolean columns
docstr_tok: ["Integration","test","of","visualizer","with","pandas","dataframe","with","string","and","boolean","columns"]
code: def test_missingvaluesbar_pandas_with_string_and_bool_cols(self):
      """
      Integration test of visualizer with pandas dataframe with string and boolean columns
      """
      X, y = make_classification(
          n_samples=400,
          n_features=10,
          n_informative=2,
          n_redundant=3,
          n_classes=2,
          n_clusters_per_class=2,
          random_state=854,
      )
  
      # add nan values to a range of values in the matrix
      X[X > 1.5] = np.nan
  
      rng = np.random.default_rng(2021)
      fruit_choices = np.array(
          ["apples", "pears", "peaches", "", np.nan, "bananas"]
      )
      fruits = rng.choice(fruit_choices, (400, 1))
  
      bool_choices = np.array([np.nan, False, True])
      booleans = rng.choice(bool_choices, (400, 1))
  
      X = np.append(X, fruits, axis=1)
      X = np.append(X, booleans, axis=1)
  
      X_ = pd.DataFrame(X)
  
      features = [str(n) for n in range(12)]
      viz = MissingValuesBar(features=features)
      viz.fit(X_, y)
      viz.finalize()
  
      self.assert_images_similar(viz, tol=5)
  
file_path: yellowbrick/tests/test_contrib/test_missing/test_bar.py
imports: import os
  import pytest
  import numpy
  from tests.base import VisualTestCase
  from sklearn.datasets import make_classification
  from yellowbrick.contrib.missing.bar import *
label_desc: Use image node_id 8 for calling the TestMissingBarVisualizer obj's underlying member method code with example usage: obj.test_missingvaluesbar_pandas_with_string_and_bool_cols() without return types