diff --git a/py-polars/polars/series/categorical.py b/py-polars/polars/series/categorical.py index d44dfa7f2024b..40a271625adfe 100644 --- a/py-polars/polars/series/categorical.py +++ b/py-polars/polars/series/categorical.py @@ -88,10 +88,10 @@ def uses_lexical_sort(self) -> bool: Examples -------- >>> s = pl.Series(["b", "a", "b"]).cast(pl.Categorical) - >>> s.uses_lexical_sort() + >>> s.cat.uses_lexical_sort() False - >>> s = s.set_ordering("lexical") - >>> s.uses_lexical_sort() + >>> s = s.cat.set_ordering("lexical") + >>> s.cat.uses_lexical_sort() True """