LinearRegression: NaN Error even after having Simple Imputer in the pipeline
I am on the classic California Housing Dataset trying to predict the median house value. So, the dataset contains NaN values in total bedrooms. I used the Simple Imputer to replace them with median values but when I go on to train the model I still get NaN values. Now, the strategy used with the imputer was median, so traditional methods for constant strategy don’t work. I have checked the dataframe and there aren’t any after my preprocessing. But when I try to preprocess and run the model together via a pipeline, I don’t know what goes wrong. I have copied some of the code that’s relevant linked the Jupyter notebook with the rest of the code for reference. Any help will be greatly appreciated. Thanks!
https://colab.research.google.com/drive/1gpaI2xJE2tY0gxEAD1oFGUGsBgRIal5q?usp=sharing