I need to encode categorial features in my dataset. I want them to be ordered, so that 'low' comes to 0 and 'vhigh' comes to 3.
I tried using label encoder from preprocessing:

```
from sklearn import preprocessing
le = preprocessing.LabelEncoder()
le.fit(['low', 'med', 'high', 'vhigh'])
ar = le.transform(df[df["buying"] == 'low']["buying"])

```

Unfortunately features were not ordered: 4th line returns array of ones, and I want an array of zeros.

I tried to create another encoder that maps numbers to numbers I want. But it seems to have just no result. 

```
other_le = preprocessing.LabelEncoder()
other_le.fit([1, 2, 0, 3])
other_le.transform(ar)

```

Last line returns ones again.

How to keep an order on categorial features in the shortest way?