File size: 611 Bytes
bdf80b1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-
"""497

Automatically generated by Colab.

Original file is located at
    https://colab.research.google.com/drive/1GsG8t6suK2oXtKkjLJgB6y0rsClY4gxd
"""

import pandas as pd
import matplotlib.pyplot as plt

df = pd.read_csv('/content/exercise_dataset.csv')
df.head()

weight = 300

print("Calories burned:", weight*df.iloc[0]["Calories per kg"], "kcal")

plt.scatter(df.index, df["130 lb"])
plt.xlabel("Index (exercise)")
plt.ylabel("Calories burned")
plt.title("Scatter plot for calories burned vs exercise index (130 lb)")
plt.show()

df.sort_values('Calories per kg', ascending=False)