In [60]: print(row.index)
Int64Index([15], dtype='int64')
I already know that the row number is 15, in this example. But I don't need to know it's type or anything else. The variable which stores it would do something based on what that number is.
There was something else about pandas I was wondering about. Suppose that this only returns one row:
row = df[df['username'] == "unique name"]
Is it any less proper to use methods like loc, iloc, etc? They still work and everything, but I was curious if it would still be done this way in larger projects.. Are there preferred methods if it's just one row, as opposed to a list of rows.