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

Unable to fill missing value

$
0
0

@yaswanth912 wrote:

I just started working on this problem. I am trying to impute missing value for “Married” column. As this has only 3 missing values I tried to impute them as “No”. I used below code to impute but it is not working. Tried with different options but I am not getting any error but the missing value is still there.

loan_dat$Married[which(is.na(loan_dat$Married))] <- "No"
loan_dat$Married <- ifelse(is.na(loan_dat$Married), "No", loan_dat$Married)

Married column is categorical and not factor in my dataframe.
Any help please.

Posts: 10

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles