pandas.Series.cat.as_ordered
pandas 3.1.1 · Series and accessors · method
Mark categories as ordered so comparisons can use their declared order.
Call syntax
Series.cat.as_ordered()Run the example
Edit the example and select Run Python to see the result.
Parameters
This call takes no arguments.
Returns
Categorical