class_docstr: List methods for Series
class_docstr_tok: ["List","methods","for","Series"]
docstr: Sort each list by the values.
  
  Sort the lists in ascending or descending order by some criterion.
  
  Parameters
  ----------
  ascending : bool, default True
      If True, sort values in ascending order, otherwise descending.
  na_position : {'first', 'last'}, default 'last'
      'first' puts nulls at the beginning, 'last' puts nulls at the end.
  ignore_index : bool, default False
      If True, the resulting axis will be labeled 0, 1, ..., n - 1.
  
  Returns
  -------
  Series or Index with each list sorted
  
  Notes
  -----
  Difference from pandas:
    * Not supporting: `inplace`, `kind`
  
  Examples
  --------
  >>> s = cudf.Series([[4, 2, None, 9], [8, 8, 2], [2, 1]])
  >>> s.list.sort_values(ascending=True, na_position="last")
  0    [2.0, 4.0, 9.0, nan]
  1         [2.0, 8.0, 8.0]
  2              [1.0, 2.0]
  dtype: list
docstr_tok: ["Sort","each","list","by","the","values",".","Sort","the","lists","in","ascending","or","descending","order","by","some","criterion",".","Parameters","--","--","--","--","--","ascending",":","bool",",","default","True","If","True",",","sort","values","in","ascending","order",",","otherwise","descending",".","na_position",":","{","'first","'",",","'last","'","}",",","default","'last'","'first","'","puts","nulls","at","the","beginning",",","'last","'","puts","nulls","at","the","end",".","ignore_index",":","bool",",","default","False","If","True",",","the","resulting","axis","will","be","labeled","0",",","1",",","...",",","n","-","1",".","Returns","--","--","--","-","Series","or","Index","with","each","list","sorted","Notes","--","--","-","Difference","from","pandas",":","*","Not","supporting",":","`","inplace","`",",","`","kind","`","Examples","--","--","--","--",">",">",">","s","=","cudf.Series","(","[","[","4",",","2",",","None",",","9","]",",","[","8",",","8",",","2","]",",","[","2",",","1","]","]",")",">",">",">","s.list.sort_values","(","ascending=True",",","na_position=","''","last","''",")","0","[","2.0",",","4.0",",","9.0",",","nan","]","1","[","2.0",",","8.0",",","8.0","]","2","[","1.0",",","2.0","]","dtype",":","list"]
code: def sort_values(
      self,
      ascending: bool = True,
      inplace: bool = False,
      kind: str = "quicksort",
      na_position: str = "last",
      ignore_index: bool = False,
  ) -> ParentType:
      """
      Sort each list by the values.
  
      Sort the lists in ascending or descending order by some criterion.
  
      Parameters
      ----------
      ascending : bool, default True
          If True, sort values in ascending order, otherwise descending.
      na_position : {'first', 'last'}, default 'last'
          'first' puts nulls at the beginning, 'last' puts nulls at the end.
      ignore_index : bool, default False
          If True, the resulting axis will be labeled 0, 1, ..., n - 1.
  
      Returns
      -------
      Series or Index with each list sorted
  
      Notes
      -----
      Difference from pandas:
        * Not supporting: `inplace`, `kind`
  
      Examples
      --------
      >>> s = cudf.Series([[4, 2, None, 9], [8, 8, 2], [2, 1]])
      >>> s.list.sort_values(ascending=True, na_position="last")
      0    [2.0, 4.0, 9.0, nan]
      1         [2.0, 8.0, 8.0]
      2              [1.0, 2.0]
      dtype: list
      """
      if inplace:
          raise NotImplementedError(
              "`inplace` not currently implemented."
          )
      if kind != "quicksort":
          raise NotImplementedError("`kind` not currently implemented.")
      if na_position not in {"first", "last"}:
          raise ValueError(f"Unknown `na_position` value {na_position}")
      if isinstance(self._column.children[1].dtype, ListDtype):
          raise NotImplementedError(
              "Nested lists sort is not supported."
          )
  
      return self._return_or_inplace(
          sort_lists(self._column, ascending, na_position),
          retain_index=not ignore_index,
      )
  
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 9 for calling the ListMethods obj's underlying member method code with example usage: obj.sort_values(ascending, inplace, kind, na_position, ignore_index) and returns: self