Hi, I am still getting error when i use predict function.reg.predict(1740). The error is ValueError: Expected 2D array, got scalar array instead, even though I have used reshape function as said previously.x_matrix = x.values.reshape(-1,1)
x_matrix.shape…… Please advise
the reg.predict(1740) doesn’t appear to be running in the newer versions of Python. Instead you could try the following:
new_array = np.array(1740).reshape(-1,1)
Do let us know if there is still an issue.
It works, Thankyou Eli.