Multiple Linear Regression in Python

Step-by-step follow along | Data Series | Episode 4.5

Mazen Ahmed
4 min readAug 16, 2020

This episode expands on Implementing Simple Linear Regression In Python. We extend our simple linear regression model to include more variables.

You can view the code used in this Episode here: SampleCode

Setting up your programming environment can be found in the first section of Ep 4.3.

Importing our Data

The first step is to import our data into python.

We can do that by going on the following link: Data

Click on “code” and download ZIP.

Locate WeatherDataM.csv and copy it into your local disc under a new file ProjectData

Note: Keep this medium post on a split screen so you can read and implement the code yourself.

Now we are ready to import our data into our Notebook:

# Import Pandas Library, used for data manipulation
# Import matplotlib, used to plot our data
# Import nump for mathemtical operations
import pandas as pd
import matplotlib.pyplot as plt
import…

--

--

Mazen Ahmed
Mazen Ahmed

No responses yet