class_docstr: List methods for Series
class_docstr_tok: ["List","methods","for","Series"]
docstr: Returns integers representing the index of the search key for each row.
  
  If ``search_key`` is a sequence, it must be the same length as the
  Series and ``search_key[i]`` represents the search key for the
  ``i``-th row of the Series.
  
  If the search key is not contained in a row, -1 is returned. If either
  the row or the search key are null, <NA> is returned. If the search key
  is contained multiple times, the smallest matching index is returned.
  
  Parameters
  ----------
  search_key : scalar or sequence of scalars
      Element or elements being searched for in each row of the list
      column
  
  Returns
  -------
  Series or Index
  
  Examples
  --------
  >>> s = cudf.Series([[1, 2, 3], [3, 4, 5], [4, 5, 6]])
  >>> s.list.index(4)
  0   -1
  1    1
  2    0
  dtype: int32
  
  >>> s = cudf.Series([["a", "b", "c"], ["x", "y", "z"]])
  >>> s.list.index(["b", "z"])
  0    1
  1    2
  dtype: int32
  
  >>> s = cudf.Series([[4, 5, 6], None, [-3, -2, -1]])
  >>> s.list.index([None, 3, -2])
  0    <NA>
  1    <NA>
  2       1
  dtype: int32
docstr_tok: ["Returns","integers","representing","the","index","of","the","search","key","for","each","row",".","If","``","search_key","``","is","a","sequence",",","it","must","be","the","same","length","as","the","Series","and","``","search_key","[","i","]","``","represents","the","search","key","for","the","``","i","``","-th","row","of","the","Series",".","If","the","search","key","is","not","contained","in","a","row",",","-1","is","returned",".","If","either","the","row","or","the","search","key","are","null",",","<","NA",">","is","returned",".","If","the","search","key","is","contained","multiple","times",",","the","smallest","matching","index","is","returned",".","Parameters","--","--","--","--","--","search_key",":","scalar","or","sequence","of","scalars","Element","or","elements","being","searched","for","in","each","row","of","the","list","column","Returns","--","--","--","-","Series","or","Index","Examples","--","--","--","--",">",">",">","s","=","cudf.Series","(","[","[","1",",","2",",","3","]",",","[","3",",","4",",","5","]",",","[","4",",","5",",","6","]","]",")",">",">",">","s.list.index","(","4",")","0","-1","1","1","2","0","dtype",":","int32",">",">",">","s","=","cudf.Series","(","[","[","``","a","''",",","``","b","''",",","``","c","''","]",",","[","``","x","''",",","``","y","''",",","``","z","''","]","]",")",">",">",">","s.list.index","(","[","``","b","''",",","``","z","''","]",")","0","1","1","2","dtype",":","int32",">",">",">","s","=","cudf.Series","(","[","[","4",",","5",",","6","]",",","None",",","[","-3",",","-2",",","-1","]","]",")",">",">",">","s.list.index","(","[","None",",","3",",","-2","]",")","0","<","NA",">","1","<","NA",">","2","1","dtype",":","int32"]
code: def index(
      self, search_key: Union[ScalarLike, ColumnLike]
  ) -> ParentType:
      """
      Returns integers representing the index of the search key for each row.
  
      If ``search_key`` is a sequence, it must be the same length as the
      Series and ``search_key[i]`` represents the search key for the
      ``i``-th row of the Series.
  
      If the search key is not contained in a row, -1 is returned. If either
      the row or the search key are null, <NA> is returned. If the search key
      is contained multiple times, the smallest matching index is returned.
  
      Parameters
      ----------
      search_key : scalar or sequence of scalars
          Element or elements being searched for in each row of the list
          column
  
      Returns
      -------
      Series or Index
  
      Examples
      --------
      >>> s = cudf.Series([[1, 2, 3], [3, 4, 5], [4, 5, 6]])
      >>> s.list.index(4)
      0   -1
      1    1
      2    0
      dtype: int32
  
      >>> s = cudf.Series([["a", "b", "c"], ["x", "y", "z"]])
      >>> s.list.index(["b", "z"])
      0    1
      1    2
      dtype: int32
  
      >>> s = cudf.Series([[4, 5, 6], None, [-3, -2, -1]])
      >>> s.list.index([None, 3, -2])
      0    <NA>
      1    <NA>
      2       1
      dtype: int32
      """
  
      if is_scalar(search_key):
          return self._return_or_inplace(
              index_of_scalar(self._column, cudf.Scalar(search_key))
          )
      else:
          return self._return_or_inplace(
              index_of_column(self._column, as_column(search_key))
          )
  
imports: from __future__ import annotations
  from functools import cached_property
  from typing import List, Optional, Sequence, Tuple, Union
  import numpy
  import pyarrow
  from typing_extensions import Self
  import cudf
  from cudf._lib.copying import segmented_gather
  from cudf._lib.lists import concatenate_list_elements, concatenate_rows, contains_scalar, count_elements, distinct, extract_element_column, extract_element_scalar, index_of_column, index_of_scalar, sort_lists
  from cudf._lib.strings.convert.convert_lists import format_list_column
  from cudf._lib.types import size_type_dtype
  from cudf._typing import ColumnBinaryOperand, ColumnLike, Dtype, ScalarLike
  from cudf.api.types import _is_non_decimal_numeric_dtype, is_scalar
  from cudf.core.column import ColumnBase, as_column, column
  from cudf.core.column.methods import ColumnMethods, ParentType
  from cudf.core.dtypes import ListDtype
  from cudf.core.missing import NA
label_desc: Use image node_id 4 for calling the ListMethods obj's underlying member method code with example usage: obj.index(search_key) and returns: self, self