pandas.Categorical.as_ordered

pandas 3.1.1 · Arrays, scalars, and data types · method

Mark categories as ordered so comparisons can use their declared order.

Call syntax

Categorical.as_ordered()

Run the example

Edit the example and select Run Python to see the result.

Parameters

This call takes no arguments.

Returns

Categorical