Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
prog.py
data.csv
import pandas as pd import numpy as np health_data = pd.read_csv("data.csv", header=0, sep=",") x = health_data["Average_Pulse"] y = health_data["Calorie_Burnage"] slope_intercept = np.polyfit(x,y,1) print(slope_intercept)
Duration,Average_Pulse,Max_Pulse,Calorie_Burnage,Hours_Work,Hours_Sleep 30,80,120,240,10,7 45,85,120,250,10,7 45,90,130,260,8,7 60,95,130,270,8,7 60,100,140,280,0,7 60,105,140,290,7,8 60,110,145,300,7,8 45,115,145,310,8,8 60,120,150,320,0,8 45,125,150,330,8,8
[ 2. 80.]