From b114dc24dc38427f25b3f78151913a2476ddecb2 Mon Sep 17 00:00:00 2001 From: Pravin Pratap Date: Tue, 20 Feb 2018 19:32:13 +0530 Subject: [PATCH] Fixed the dataframe The dataframe creation for both the x_values as well as y_values were showing weird plots as is. This patch fixes that. --- demo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo.py b/demo.py index b5a0f08..d292306 100644 --- a/demo.py +++ b/demo.py @@ -4,8 +4,8 @@ #read data dataframe = pd.read_fwf('brain_body.txt') -x_values = dataframe[['Brain']] -y_values = dataframe[['Body']] +x_values = dataframe[['Brain']].values.tolist() # Credits : @xyzen +y_values = dataframe[['Body']].values.tolist() #train model on data body_reg = linear_model.LinearRegression()