Skip to content

Instantly share code, notes, and snippets.

@letthedataconfess
Created December 16, 2021 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save letthedataconfess/80d1f2db544334f19394bd3c1b9fb354 to your computer and use it in GitHub Desktop.
Save letthedataconfess/80d1f2db544334f19394bd3c1b9fb354 to your computer and use it in GitHub Desktop.
import category_encoders as ce
ce.TargetEncoder(smoothing=0).fit_transform(df.Age,df.Survived)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment