title: Best way to make a linear regression model from a split .csv dataset?
body: <p>I'm generally quite new to Python, and I'm having trouble making a linear regression model. I need to make it from a training and test set from a large excel dataset (.csv). </p>
  
  <p>I've split the dataset already:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  df = pd.read_csv('C:/Dataset.csv')
  df['split'] = np.random.randn(df.shape[0], 1)
  split = np.random.rand(len(df)) &lt;= 0.75
  
  training_set = df[split]
  testing_set = df[~split]
  </code></pre>
  
  <p>How can I use this split data to make a linear regression model using the Mean Average Error?</p>
  
  <p>Thanks.</p>