Exemple de l'encodeur cible Sklearn

encoder = TargetEncoder()df['Animal Encoded'] = encoder.fit_transform(df['Animal'], df['Target'])
Eager Eland