import pandas as pd
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
import numpy as np

data = pd.read_csv('./data.csv')
x = np.array(data.Education).reshape(-1, 1)
y = np.array(data.Income).reshape(-1, 1)
model = LinearRegression()
model.fit(x, y)
yPred = model.predict(x)
plt.scatter(x, y, c='b')
plt.plot(x, yPred, color='r')
plt.show()

