Polars 1.42+ provides pl.Expr.is_sorted() which returns a boolean indicating whether the column is sorted.
It could be nice that this check could be define in a dataframely schema without needing a custom check.
Implementation:sorted could take 3 values: "ascending", "descending" and "None" (the default). The polars implementation takes as well a nulls_last argument, maybe we shouldn't include this complexity here and user could use a custom check if the position of nulls maters. WDYT ?
Polars 1.42+ provides
pl.Expr.is_sorted()which returns a boolean indicating whether the column is sorted.It could be nice that this check could be define in a dataframely schema without needing a custom check.
Implementation:
sortedcould take 3 values: "ascending", "descending" and "None" (the default). The polars implementation takes as well anulls_lastargument, maybe we shouldn't include this complexity here and user could use a custom check if the position of nulls maters. WDYT ?