class_docstr: A one-dimensional frame.
  
  Frames with only a single column share certain logic that is encoded in
  this class.
docstr: Encode the input values as integer labels.
  
  Parameters
  ----------
  sort : bool, default True
      Sort uniques and shuffle codes to maintain the relationship.
  na_sentinel : number, default -1
      Value to indicate missing category.
  
      .. deprecated:: 23.04
  
         The na_sentinel argument is deprecated and will be removed in
         a future version of cudf. Specify use_na_sentinel as
         either True or False.
  use_na_sentinel : bool, default True
      If True, the sentinel -1 will be used for NA values.
      If False, NA values will be encoded as non-negative
      integers and will not drop the NA from the uniques
      of the values.
  
  Returns
  -------
  (labels, cats) : (cupy.ndarray, cupy.ndarray or Index)
      - *labels* contains the encoded values
      - *cats* contains the categories in order that the N-th
        item corresponds to the (N-1) code.
  
  Examples
  --------
  >>> import cudf
  >>> s = cudf.Series(['a', 'a', 'c'])
  >>> codes, uniques = s.factorize()
  >>> codes
  array([0, 0, 1], dtype=int8)
  >>> uniques
  StringIndex(['a' 'c'], dtype='object')
docstr_tok: ["Encode","the","input","values","as","integer","labels",".","Parameters","--","--","--","--","--","sort",":","bool",",","default","True","Sort","uniques","and","shuffle","codes","to","maintain","the","relationship",".","na_sentinel",":","number",",","default","-1","Value","to","indicate","missing","category",".","..","deprecated",":",":","23.04","The","na_sentinel","argument","is","deprecated","and","will","be","removed","in","a","future","version","of","cudf",".","Specify","use_na_sentinel","as","either","True","or","False",".","use_na_sentinel",":","bool",",","default","True","If","True",",","the","sentinel","-1","will","be","used","for","NA","values",".","If","False",",","NA","values","will","be","encoded","as","non-negative","integers","and","will","not","drop","the","NA","from","the","uniques","of","the","values",".","Returns","--","--","--","-","(","labels",",","cats",")",":","(","cupy.ndarray",",","cupy.ndarray","or","Index",")","-","*","labels","*","contains","the","encoded","values","-","*","cats","*","contains","the","categories","in","order","that","the","N-th","item","corresponds","to","the","(","N-1",")","code",".","Examples","--","--","--","--",">",">",">","import","cudf",">",">",">","s","=","cudf.Series","(","[","'","a","'",",","'","a","'",",","'","c","'","]",")",">",">",">","codes",",","uniques","=","s.factorize","(",")",">",">",">","codes","array","(","[","0",",","0",",","1","]",",","dtype=int8",")",">",">",">","uniques","StringIndex","(","[","'","a","'","'","c","'","]",",","dtype='object","'",")"]
code: def factorize(
      self, sort=False, na_sentinel=None, use_na_sentinel=None
  ):
      """Encode the input values as integer labels.
  
      Parameters
      ----------
      sort : bool, default True
          Sort uniques and shuffle codes to maintain the relationship.
      na_sentinel : number, default -1
          Value to indicate missing category.
  
          .. deprecated:: 23.04
  
             The na_sentinel argument is deprecated and will be removed in
             a future version of cudf. Specify use_na_sentinel as
             either True or False.
      use_na_sentinel : bool, default True
          If True, the sentinel -1 will be used for NA values.
          If False, NA values will be encoded as non-negative
          integers and will not drop the NA from the uniques
          of the values.
  
      Returns
      -------
      (labels, cats) : (cupy.ndarray, cupy.ndarray or Index)
          - *labels* contains the encoded values
          - *cats* contains the categories in order that the N-th
            item corresponds to the (N-1) code.
  
      Examples
      --------
      >>> import cudf
      >>> s = cudf.Series(['a', 'a', 'c'])
      >>> codes, uniques = s.factorize()
      >>> codes
      array([0, 0, 1], dtype=int8)
      >>> uniques
      StringIndex(['a' 'c'], dtype='object')
      """
      return cudf.core.algorithms.factorize(
          self,
          sort=sort,
          na_sentinel=na_sentinel,
          use_na_sentinel=use_na_sentinel,
      )
  
imports: from __future__ import annotations
  import warnings
  from typing import Any, Dict, Optional, Tuple, Union
  import cupy
  import numpy
  import cudf
  from cudf._typing import Dtype, NotImplementedType, ScalarLike
  from cudf.api.extensions import no_default
  from cudf.api.types import _is_scalar_or_zero_d_array, is_bool_dtype, is_integer, is_integer_dtype
  from cudf.core.column import ColumnBase, as_column
  from cudf.core.frame import Frame
  from cudf.utils.nvtx_annotation import _cudf_nvtx_annotate
  from cudf.utils.utils import NotIterable
label_desc: Use image node_id 21 for calling the SingleColumnFrame obj's underlying member method code with example usage: obj.factorize(sort, na_sentinel, use_na_sentinel) and returns: cudf