If you want to create a categorical variable, use pandas.Categorical. This variable takes on a limited number of possible values and can be ordered.
In the code above, I use pd.Categorical to create a list of ordered categories. This list can be sorted based on its specified order.