I am working on Melbourne housing dataset and during the pre processing I'm trying to impute missing data using the Mean / median strategy. I tried using Imputer from Sklearn.preprocessing.
imp = Imputer( strategy='mean' )
dataset = imp.fit(dataset)
Upon running this I encountered this error.
ValueError: could not convert string to float: 'Western Metropolitan'
I am aware that the imputing takes place only in float values but I need to do either of the 2:
1) Impute only values other than string in the dataset
2) Impute data with string
I could not find any kind of solution online. Thanks in advance.