Polynomial Regression in Python
Step-by-step follow along | Data Series | Episode 4.7
You can view the code and data used in this Episode here: Link
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 WeatherDataP.csv and copy it into your local disc under a new file called ProjectData
Note: WeatherData.csv and WeahterDataM.csv were used in Simple Linear Regression and Multiple Linear Regression.
Now we are ready to import our data into our Notebook:
How to set up a new Notebook can be found at the start of Episode 4.3
Note: Keep this medium post on a split screen so you can read and implement the code yourself.
# Import Pandas Library, used for data manipulation
# Import matplotlib, used to plot our data
# Import numpy for linear algebra operations
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
# Import our WeatherDataP.csv and store it in the variable rweather_data_p
weather_data_p = pd.read_csv("D:\ProjectData\WeatherDataP.csv")
# Display the data in the notebook
weather_data_p