Re-write custom feature encoding function python
Just have the time to take a quick view on your code, but one of the first thing you have to learn to do (before using design pattern and such things), is to refactor your code.

By simply scrolling, we can see df_additional[col] more than ten times. For all the places where you just need to read this value, use a local variable to store it. If you need to write it, in that case leave it.

There is also df_additional = pd.concat([df_additional.iloc[:, :loc_col], df_additional_one_hot, df_additional.iloc[:, loc_col:]], axis=1).drop(col, axis=1) a couple of time, with just a local variable used as a parameter which changes between those calls. Maybe you can also refactor that?

It's also worth noting that if your if (or whatever loop or control statement) begins to be long (dozen of lines), and even more when you have several if like that, think about isolating each block in a separate function. Or at least all the complete if/elif block in a function.