Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Created August 19, 2019 13:29
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 lakshay-arora/4242908389479dea5ca1116d8a84151d to your computer and use it in GitHub Desktop.
Save lakshay-arora/4242908389479dea5ca1116d8a84151d to your computer and use it in GitHub Desktop.
import pandas as pd
import category_encoders as ce
# create a Dataframe
data = pd.DataFrame({ 'gender' : ['Male', 'Female', 'Male', 'Female', 'Female'],
'class' : ['A','B','C','D','A'],
'city' : ['Delhi','Gurugram','Delhi','Delhi','Gurugram'] })
data.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment