I created pivot table:
matrix_df = data.pivot_table(index = 'title', columns = 'userId', values = 'rating')
So, for each 'title' I have row of some numerical data. I create 2d array out of this numerical data:
matrix = matrix_df.to_numpy()
Then I did something with this data and find that row I need has index 32. Now I want to check what is the title of row 32. I can access this row from matrix_df:
matrix_df.iloc[32]
Since title seems to be your index, you can just extract the value for
index
at the row 32