text_html_output_1.png
from sklearn import linear_model

import pandas as pd

df = pd.read_csv('../input/used-car-dataset-ford-and-mercedes/toyota.csv')

X = df[['year', 'mileage']]
Y = df['price']

regr = linear_model.LinearRegression()
regr.fit(X.values, Y)
print('intercept :', regr.intercept_)
print('coefficient :', regr.coef_)
print("Prediction : ['Year', 'Mileage']")
prediction = regr.predict([[2020, 20000]])
print('Price Prediction : ', prediction)