I have the following dataframe having "Location" and "Name" as the index.
Location Name Cost Item Purchased
Store 1 Chris 22.5 Dog Food
Kevyn 2.5 Kitty Litter
Store 2 Vinod 5.0 Bird Seed
I can access df.loc["Store 1"]
But df.loc["Store 1"]["Kevyn"] is giving me KeyError. What am I doing wrong?
df.loc[("Store 1","Kevyn")], see the docs pandas.pydata.org/pandas-docs/stable/…