In the first notebook " Encoding of categorical variables" after code cell 12 the first example is correct:
However, be careful when applying this encoding strategy: using this integer representation leads downstream predictive models to assume that the values are ordered (0 < 1 < 2 < 3… for instance).
Then later after code cell 18 in the example > is used instead of <:
Indeed, using an
OrdinaleEncoder
will output ordinal categories. It means that there is an order in the resulting categories (e.g.0 > 1 > 2
).