parameters: (
          self, value: ScalarLike, closest: bool = False
      )
return_statement: return indices[0]
docstring: Returns offset of first value that matches
docstring_summary: Returns offset of first value that matches
docstring_tokens: Returns offset of first value that matches
function: def find_first_value(
          self, value: ScalarLike, closest: bool = False
      ) -> int:
          """
          Returns offset of first value that matches
          """
          # FIXME: Inefficient, may be need a libcudf api
          index = cudf.core.index.RangeIndex(0, stop=len(self))
          indices = index.take(self == value)
          if not len(indices):
              raise ValueError("value not found")
          return indices[0]
function_tokens: def find_first_value ( self , value : ScalarLike , closest : bool = False ) -> int : # FIXME: Inefficient, may be need a libcudf api index = cudf . core . index . RangeIndex ( 0 , stop = len ( self ) ) indices = index . take ( self == value ) if not len ( indices ) : raise ValueError ( "value not found" ) return indices [ 0 ]