polars.Series.cat.uses_lexical_ordering#
- Series.cat.uses_lexical_ordering() bool [source]#
Return whether or not the series uses lexical ordering.
Warning
This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.
Examples
>>> s = pl.Series(["b", "a", "b"]).cast(pl.Categorical) >>> s.cat.uses_lexical_ordering() False >>> s = s.cast(pl.Categorical("lexical")) >>> s.cat.uses_lexical_ordering() True