I have a dataframe as follows:
Type Name Category
Bird Flappy Bird Air
Bird Pigeon Air
Pokemon Jerry Aquatic
Pokemon Mudkip Aquatic
Animal Lion Terrestrial
Bird Pigeon Air2
For the given name like say "Pigeon", I need to access the corresponding value in the category Column i.e it should give me the string "Air" .
I have 2 values of Pigeon but i need to return "Air" for 2nd observation.
Please note that I am not using indexing at all so having something like 2nd observation with iloc would'nt do. I need to access it by value in the other column.
Or something like obtaining the index of "Pigeon" and using that to get the corresponding column value will do.
df[df.Name == 'Pigeon'].Categorywork?