You are viewing a single comment's thread from:
RE: Payment for Coding done
Predict the price for a specific date
date_to_predict = pd.to_datetime("2023-09-04")
day_to_predict = date_to_predict.day
month_to_predict = date_to_predict.month
predicted_price = model.predict([[day_to_predict, month_to_predict]])
print(f'Predicted price for {date_to_predict}: ${predicted_price[0]:.2f}')