import pandas as pd --pandas: read data set
from sklearn import linear_model -- (scikit learn maschine learning databse )
import matplotlib.pyplot as plt --visualisieren model and data
#read data
dataframe = pd.read_fwf('brain_body.txt') -- read fwf function read dataset
x_values = dataframe[['Brain']]
y_values = dataframe[['Body']]
#train model on data
body_reg = linear_model.LinearRegression() --initialize the linear regression
body_reg.fit(x_values,y_values)
#vidualize results
plt.scatter(x_values,y_values) --show x,y value
plt.plot(x_values,body_reg.predict(x_values))
plt.show()