Quantcast
Viewing all articles
Browse latest Browse all 4448

Python 3.0 error in Label Encoding

@vijayreddy wrote:

 from sklearn.preprocessing import LabelEncoder
var_mod = ['Gender','Married','Dependents','Education','Self_Employed','Property_Area','Loan_Status']
le = LabelEncoder()
for i in var_mod:
    df[i] = le.fit_transform(df[i])
df.dtypes 

when i run this code in python3.0 (Anaconda) , m getting " ‘<’ not supported between instances of ‘str’ and ‘float’ "

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles