pipeline = Pipeline([('vectorizer', CountVectorizer()), ('to_dense',
    DenseTransformer()), ('classifier', RandomForestClassifier())])
Scikit-Learn's Pipeline: A sparse matrix was passed, but dense data is required