Hi. I possess a pandas dataframe and I am seeking to identify the index of a specific entry within it.
Name Age 0 Mike 23 1 Eric 25 2 Donna 23 3 Will 23
This is the dataframe. I want to find the index of Donna. How can I do it?
1 answer
First, use the dataframe to match the value, and then find the index. Try this:
print(df[df[Name]==Donna].index.values)
It worked. Thanks
find positions of a single value in a dataframe
Thanks a lot, this helped me to.