Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 445

obtain pivot row name from index

$
0
0

I create a pivot table like that below:

enter image description here

I store the values in a matrix and apply a certain function to the matrix. The outputs of the function are the indexes of some rows and columns of the matrix (let's suppose that the function outputs are the squared rows and columns).Now I need to associate the corresponding row and column names from the pivot (e.g. A, D, X, Z).I tried

row_name = piv.index[row_idx]

with row_idx defined in the function file, but it tells me that row_idx is not defined.How can I solve this issue?


Viewing all articles
Browse latest Browse all 445

Trending Articles