class_docstr: Convert a collection of text documents to a matrix of token counts
  
  If you do not provide an a-priori dictionary then the number of features
  will be equal to the vocabulary size found by analyzing the data.
  
  Parameters
  ----------
  lowercase : boolean, True by default
      Convert all characters to lowercase before tokenizing.
  preprocessor : callable or None (default)
      Override the preprocessing (string transformation) stage while
      preserving the tokenizing and n-grams generation steps.
  stop_words : string {'english'}, list, or None (default)
      If 'english', a built-in stop word list for English is used.
      If a list, that list is assumed to contain stop words, all of which
      will be removed from the input documents.
      If None, no stop words will be used. max_df can be set to a value
      to automatically detect and filter stop words based on intra corpus
      document frequency of terms.
  ngram_range : tuple (min_n, max_n), default=(1, 1)
      The lower and upper boundary of the range of n-values for different
      word n-grams or char n-grams to be extracted. All values of n such
      such that min_n <= n <= max_n will be used. For example an
      ``ngram_range`` of ``(1, 1)`` means only unigrams, ``(1, 2)`` means
      unigrams and bigrams, and ``(2, 2)`` means only bigrams.
  analyzer : string, {'word', 'char', 'char_wb'}
      Whether the feature should be made of word n-gram or character
      n-grams.
      Option 'char_wb' creates character n-grams only from text inside
      word boundaries; n-grams at the edges of words are padded with space.
  max_df : float in range [0.0, 1.0] or int, default=1.0
      When building the vocabulary ignore terms that have a document
      frequency strictly higher than the given threshold (corpus-specific
      stop words).
      If float, the parameter represents a proportion of documents, integer
      absolute counts.
      This parameter is ignored if vocabulary is not None.
  min_df : float in range [0.0, 1.0] or int, default=1
      When building the vocabulary ignore terms that have a document
      frequency strictly lower than the given threshold. This value is also
      called cut-off in the literature.
      If float, the parameter represents a proportion of documents, integer
      absolute counts.
      This parameter is ignored if vocabulary is not None.
  max_features : int or None, default=None
      If not None, build a vocabulary that only consider the top
      max_features ordered by term frequency across the corpus.
      This parameter is ignored if vocabulary is not None.
  vocabulary : cudf.Series, optional
      If not given, a vocabulary is determined from the input documents.
  binary : boolean, default=False
      If True, all non zero counts are set to 1. This is useful for discrete
      probabilistic models that model binary events rather than integer
      counts.
  dtype : type, optional
      Type of the matrix returned by fit_transform() or transform().
  delimiter : str, whitespace by default
      String used as a replacement for stop words if stop_words is not None.
      Typically the delimiting character between words is a good choice.
  
  Attributes
  ----------
  vocabulary_ : cudf.Series[str]
      Array mapping from feature integer indices to feature name.
  stop_words_ : cudf.Series[str]
      Terms that were ignored because they either:
        - occurred in too many documents (`max_df`)
        - occurred in too few documents (`min_df`)
        - were cut off by feature selection (`max_features`).
  
      This is only available if no vocabulary was given.
class_docstr_tok: ["Convert","a","collection","of","text","documents","to","a","matrix","of","token","counts","If","you","do","not","provide","an","a-priori","dictionary","then","the","number","of","features","will","be","equal","to","the","vocabulary","size","found","by","analyzing","the","data",".","Parameters","--","--","--","--","--","lowercase",":","boolean",",","True","by","default","Convert","all","characters","to","lowercase","before","tokenizing",".","preprocessor",":","callable","or","None","(","default",")","Override","the","preprocessing","(","string","transformation",")","stage","while","preserving","the","tokenizing","and","n-grams","generation","steps",".","stop_words",":","string","{","'english","'","}",",","list",",","or","None","(","default",")","If","'english","'",",","a","built-in","stop","word","list","for","English","is","used",".","If","a","list",",","that","list","is","assumed","to","contain","stop","words",",","all","of","which","will","be","removed","from","the","input","documents",".","If","None",",","no","stop","words","will","be","used",".","max_df","can","be","set","to","a","value","to","automatically","detect","and","filter","stop","words","based","on","intra","corpus","document","frequency","of","terms",".","ngram_range",":","tuple","(","min_n",",","max_n",")",",","default=","(","1",",","1",")","The","lower","and","upper","boundary","of","the","range","of","n-values","for","different","word","n-grams","or","char","n-grams","to","be","extracted",".","All","values","of","n","such","such","that","min_n","<","=","n","<","=","max_n","will","be","used",".","For","example","an","``","ngram_range","``","of","``","(","1",",","1",")","``","means","only","unigrams",",","``","(","1",",","2",")","``","means","unigrams","and","bigrams",",","and","``","(","2",",","2",")","``","means","only","bigrams",".","analyzer",":","string",",","{","'word","'",",","'char","'",",","'char_wb","'","}","Whether","the","feature","should","be","made","of","word","n-gram","or","character","n-grams",".","Option","'char_wb","'","creates","character","n-grams","only","from","text","inside","word","boundaries",";","n-grams","at","the","edges","of","words","are","padded","with","space",".","max_df",":","float","in","range","[","0.0",",","1.0","]","or","int",",","default=1.0","When","building","the","vocabulary","ignore","terms","that","have","a","document","frequency","strictly","higher","than","the","given","threshold","(","corpus-specific","stop","words",")",".","If","float",",","the","parameter","represents","a","proportion","of","documents",",","integer","absolute","counts",".","This","parameter","is","ignored","if","vocabulary","is","not","None",".","min_df",":","float","in","range","[","0.0",",","1.0","]","or","int",",","default=1","When","building","the","vocabulary","ignore","terms","that","have","a","document","frequency","strictly","lower","than","the","given","threshold",".","This","value","is","also","called","cut-off","in","the","literature",".","If","float",",","the","parameter","represents","a","proportion","of","documents",",","integer","absolute","counts",".","This","parameter","is","ignored","if","vocabulary","is","not","None",".","max_features",":","int","or","None",",","default=None","If","not","None",",","build","a","vocabulary","that","only","consider","the","top","max_features","ordered","by","term","frequency","across","the","corpus",".","This","parameter","is","ignored","if","vocabulary","is","not","None",".","vocabulary",":","cudf.Series",",","optional","If","not","given",",","a","vocabulary","is","determined","from","the","input","documents",".","binary",":","boolean",",","default=False","If","True",",","all","non","zero","counts","are","set","to","1",".","This","is","useful","for","discrete","probabilistic","models","that","model","binary","events","rather","than","integer","counts",".","dtype",":","type",",","optional","Type","of","the","matrix","returned","by","fit_transform","(",")","or","transform","(",")",".","delimiter",":","str",",","whitespace","by","default","String","used","as","a","replacement","for","stop","words","if","stop_words","is","not","None",".","Typically","the","delimiting","character","between","words","is","a","good","choice",".","Attributes","--","--","--","--","--","vocabulary_",":","cudf.Series","[","str","]","Array","mapping","from","feature","integer","indices","to","feature","name",".","stop_words_",":","cudf.Series","[","str","]","Terms","that","were","ignored","because","they","either",":","-","occurred","in","too","many","documents","(","`","max_df","`",")","-","occurred","in","too","few","documents","(","`","min_df","`",")","-","were","cut","off","by","feature","selection","(","`","max_features","`",")",".","This","is","only","available","if","no","vocabulary","was","given","."]
docstr: Filter dataframe to keep only values from column matching
  keep_values.
docstr_tok: ["Filter","dataframe","to","keep","only","values","from","column","matching","keep_values","."]
code: def _filter_and_renumber(self, df, keep_values, column):
      """
      Filter dataframe to keep only values from column matching
      keep_values.
      """
      df[column] = (
          df[column]
          .astype("category")
          .cat.set_categories(keep_values)
          ._column.codes
      )
      df = df.dropna(subset=column)
      return df
  
imports: from cuml.internals.safe_imports import cpu_only_import
  import cuml.internals.logger
  from cudf.utils.dtypes import min_signed_type
  from cuml.internals.type_utils import CUPY_SPARSE_DTYPES
  import numbers
  from cuml.internals.safe_imports import gpu_only_import
  from functools import partial
  from cuml.common.sparsefuncs import create_csr_matrix_from_count_df
  from cuml.common.sparsefuncs import csr_row_normalize_l1, csr_row_normalize_l2
  from cuml.feature_extraction._stop_words import ENGLISH_STOP_WORDS
  from cuml.common.exceptions import NotFittedError
  from cuml.internals.safe_imports import gpu_only_import_from
label_desc: Use image node_id 3 for calling the CountVectorizer obj's underlying member method code with example usage: obj._filter_and_renumber(df, keep_values, column) and returns: df