Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

label encode one column pandas

from sklearn import preprocessing
le = preprocessing.LabelEncoder()
df['label'] = le.fit_transform(df['label'])
Comment

PREVIOUS NEXT
Code Example
Python :: activate venv enviroment 
Python :: how to install python 3.6 ubuntu 
Python :: scikit learn svm 
Python :: how to show webcam in opencv 
Python :: python get lines from text file 
Python :: Dummy or One Hot Encoding code with pandas 
Python :: read csv without index 
Python :: Violin Plots, Python 
Python :: quit button tkinter 
Python :: my pygame window wont stay open 
Python :: python pynput letter key pressed 
Python :: how to change icon in pygame 
Python :: python des 
Python :: check numpy arrays equal 
Python :: tkinter canvas remove 
Python :: selenium webdriver python 
Python :: scaling image interpolation python 
Python :: python execute file 
Python :: mode of a column in df 
Python :: round list of floats python 
Python :: proper tree in data structure 
Python :: how to convert tuple to int in python 
Python :: how to create a loop in python turtle 
Python :: use of == python 
Python :: reload function jupyter notebook 
Python :: Creating virtual environments 
Python :: python turtle background image 
Python :: get date and time formatted python 
Python :: read pdf py 
Python :: find number of common element in two python array 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =