Input contains NaN, infinity or a value too large for dtype('float64') LinearRegression: but there are no empty values
Since you did mention that the error is happening during the prediction time, I would suggest that you make the testing data go through the same pipeline as the training data.
For example:
raw training input -> preprocessing -> training input
It is necessary the test data also goes through the same preprocessing.
Originally, my input dataset had blank spaces. But I have cleaned it, and checked with:
df.isnull().sum()
And everthing is 0.
Now, after fitting my dataset into the LinearRegression model and about to make predictions, it's bringing the above error.