import pandas as pd

df = pd.read_json('files/fitness.json')

print("All Data:")
print(df)

print("\n")

print("Just Weight and Calories:")
print(df[['Weight','Calories']].to_string(index=False))

print("\n")

print("Sorted by most to least calories per day:")
print(df.sort_values(by=['Calories'], ascending=True))

print("\n")
All Data:
  Student Name  Weight  Height  Calories
0       Paaras     160      69      1819
1      Chinmay     140      68      1800
2        Tanay     140      66      1835
3       Raunak     145      66      1825


Just Weight and Calories:
 Weight  Calories
    160      1819
    140      1800
    140      1835
    145      1825


Sorted by most to least calories per day:
  Student Name  Weight  Height  Calories
1      Chinmay     140      68      1800
0       Paaras     160      69      1819
3       Raunak     145      66      1825
2        Tanay     140      66      1835


print("Who's weight is above 150 pounds?")
print(df[df.Weight > 150])

print("\n")

print("Tallest:")
print(df[df.Height == df.Height.max()])
print("Shortest:")
print(df[df.Height == df.Height.min()])
Who's weight is above 150 pounds?
  Student Name  Weight  Height  Calories
0       Paaras     160      69      1819


Tallest:
  Student Name  Weight  Height  Calories
0       Paaras     160      69      1819
Shortest:
  Student Name  Weight  Height  Calories
2        Tanay     140      66      1835
3       Raunak     145      66      1825