Data wrangling

Use categoricals encoder on new data

Use previously fitted categoricals encoder on new data. Please just select encoder and DataFrame to convert categoricals. The encoder has information about which columns where present during fit and will convert only fitted columns. In case of new values, unseen during fit, the handle method selected during encoder initialization will be applied. Good luck!

pandascategorical

Required packages

You need below packages to use the code generated by recipe. All packages are automatically installed in MLJAR Studio.

pandas>=1.0.0

scikit-learn>=1.0.0

Interactive recipe

You can use below interactive recipe to generate code. This recipe is available in MLJAR Studio.

In the below recipe, we assume that you have following variables available in your notebook:

  • my_encode (type OrdinalEncoder)
  • df_1 (type DataFrame)
  • df_2 (type DataFrame)

Python code

# Python code will be here