I\'ve got pandas data with some columns of text type. There are some NaN values along with these text columns. What I\'m trying to do is to impute those NaN\'s by skle
sklearn.impute.SimpleImputer instead of Imputer can easily resolve this, which can handle categorical variable.
As per the Sklearn documentation: If “most_frequent”, then replace missing using the most frequent value along each column. Can be used with strings or numeric data.
https://scikit-learn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html
impute_size=SimpleImputer(strategy="most_frequent")
data['Outlet_Size']=impute_size.transform(data[['Outlet_Size']])