I am trying to build a ML model. However I am having difficulties in understanding where to apply the encoding. First I split the dataset into train and test: