I was training the model in python the below is my code!
The erro has been occured.
**
ValueError: could not convert string to float: ‘2020-03-24’
**
#split the data into x and y
x = tsla.drop(“Date”, axis=1)
y = tsla[‘Date’]
#split the data into train and test
x_train, x_test, y_train, y_tset = train_test_split(x,y, test_size=0.2, random_state=42)
model
model = LinearRegression()
model.fit(x_train, y_train)
I am try to Train the model on x y.
New contributor
Zeeshan Ayaz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.