Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

DS with phython

$
0
0

@tillutony wrote:

HI Experts ,
learning and working with data science with phython ans stuck with the following

when I execute the following code in anaconda/Jupiter its giving me an eeror.

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

Error

File "", line 2
from sklearn.preprocessing import LabelEncoder
^
IndentationError: unexpected indent

please help me in troubleshooting

Regards,
Tony

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles