Obtaining Dataframe Values

cereal.loc[[63]]
name mfr type calories ... shelf weight cups rating
63 Shredded Wheat N Cold 80 ... 1 0.83 1.0 68.235885

1 rows × 16 columns


cereal.loc[63, 'calories']
np.int64(80)
cereal.loc[[66]]
name mfr type calories ... shelf weight cups rating
66 Smacks K Cold 110 ... 2 1.0 0.75 31.230054

1 rows × 16 columns


cereal.loc[66, 'rating']
np.float64(31.230054)

Let’s apply what we learned!