| |
| """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) |