Am getting NAN error when working on loan prediction problem

missing_values

#1

am getting NAN error when working on loan prediction problem could any one help on this


#2

Hi @sravya97,

You probably have null values in one of the columns in your dataset. Replace the null values and then fit the model.


#3

Hi @sravya97 ,

There is an funcation called imputer in scikit learn library in python which is useful to solve the missing value issues.

from sklearn.impute import SimpleImputer

For numerical variables you can use strategy as “Mean” and for categorical variables you can impute strategy as “Mode”.

Hope this helps.

Thanks,
Deepak