I have a dataframe of information. One column is a rank. I just want to find the row with a rank of 2 and get the another column item (called 'Name'.) I can find the row and get the name but its not a pure text item that I can add to other text. Its an object.
How do I just get the name as text?
Code:
print "The name of the 2nd best is: " + groupDF.loc[(DF['Rank']==2),'Name']
This gives me the id of the row and the Name. I just want the Name
This is what I get:
4 The name of the 2nd best is: Hawthorne
Name: CleanName, dtype: object
I just can't figure out what to search on to get the answer. I get lots of other stuff but not this answer.
Thanks in advance.
groupDF.iloc[(DF['Rank']==2)]]['Name']