Error in SimpleImputer My code:
from sklearn.impute import SimpleImputer

fill_values=SimpleImputer(missing_values=0,strategy='mean')

X_train=fill_values.fit(X_train)
X_test=fill_values.fit(X_test)

imp_X_train=fill_values.transform(X_train)
imp_X_test=fill_values.trainsform(X_test)

Gives the error:
TypeError: float() argument must be a string or a number, not 'SimpleImputer'

Where did I go wrong?
If you want to transform a data array, for example, X_train, with a preprocessor like SimpleImputer you should use method .fit_transform.

For example: X_train = fill_values.fit_transform(X_train)

If you use only fit it will return an instance of type SimpleImputer which is your error.