class_docstr: Namespace for categorical related series.
class_docstr_tok: ["Namespace","for","categorical","related","series","."]
docstr: Determine how this categorical series should be sorted.
  
  Parameters
  ----------
  ordering : {'physical', 'lexical'}
      Ordering type:
  
      - 'physical' -> Use the physical representation of the categories to
          determine the order (default).
      - 'lexical' -> Use the string values to determine the ordering.
docstr_tok: ["Determine","how","this","categorical","series","should","be","sorted",".","Parameters","--","--","--","--","--","ordering",":","{","'physical","'",",","'lexical","'","}","Ordering","type",":","-","'physical","'","-",">","Use","the","physical","representation","of","the","categories","to","determine","the","order","(","default",")",".","-","'lexical","'","-",">","Use","the","string","values","to","determine","the","ordering","."]
code: def set_ordering(self, ordering: CategoricalOrdering) -> Series:
      """
      Determine how this categorical series should be sorted.
  
      Parameters
      ----------
      ordering : {'physical', 'lexical'}
          Ordering type:
  
          - 'physical' -> Use the physical representation of the categories to
              determine the order (default).
          - 'lexical' -> Use the string values to determine the ordering.
      """
  
file_path: polars/py-polars/polars/series/categorical.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING
  from polars.series.utils import expr_dispatch
  from polars.utils._wrap import wrap_s
  from polars.utils.deprecation import deprecate_function
label_desc: Use image node_id 2 for calling the CatNameSpace obj's underlying member method code with example usage: obj.set_ordering(ordering) without return types