I have created a contingency table in pandas using pd.crosstab
and it looks like the following:
colindex 0 1
rowindex
0 28 2
1 8 1
The resulting contingency table has a column index Index([0, 1], dtype='Int64', name='colindex')
and a row index Index([0, 1], dtype='Int64', name='rowindex')
. How can I index the count from a single cell of the contingency table? I can’t seem to figure out how pandas multi-indexing is supposed to work.