Error:ValueError at /prediction/add/
columns are missing: {'Unnamed: 0'} in prediction=model.predict(data)
my code is
car=pd.read_csv('data/Cleaned_Car_data.csv')
print(car)
x=car.drop(columns='Price')
y=car['Price']
my=x.info()
print(my)
Reason
A "ValueError" in machine learning typically occurs when there is an issue related to the values or data types being used. It signifies that the input or output values do not match the expected format or fall outside the valid range
Solution
x = x.drop('Unnamed: 0', axis=1)
my=x.info()
print(my)
x = x.drop('Unnamed: 0', axis=1)
print('cleaned data x target')
z=x.info()
print(z)
Top comments (0)