I have identified the row numbers of where I need to get within my excel file, with python pandas; using the below:
row_numberd1 = df[df['Member Name'].str.contains(NameUp)].index.min()
row_numberd12 = df[df['Member Address Line 3'].str.contains(Zip)].index.min()
i.e. when I print, the row numbers display:
print(row_numberd1)
print(row_numberd12)
Now, I am simply wondering how I can use the row number; to get a different columns value. So, get columns value by row number.
So, for instance, in the below sample:
Age City
1 34 Sydney
2 30 Delhi
3 16 New York
How could I use the row number; i.e. let's say Row 3
, Column 'City
' to get the 'New York
' value?