polars.Series.set_sorted

Series.set_sorted(reverse: bool = False) polars.internals.series.Series

Set this Series as sorted so that downstream code can use fast paths for sorted arrays.

Warning

This can lead to incorrect results if this Series is not sorted!! Use with care!

Parameters
reverse

If the Series order is reversed, e.g. descending.