@plarion wrote:
Getting "TypeError: '>' not supported between instances of 'str' and 'float'"
in below code snippet
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]) ## typeError at this line
df.dtypes
Posts: 1
Participants: 1