I have a dataframe df structured as follows:
from rate to
0 CHF 1.000000 CHF
1 CHF 19.673256 MXN
2 CHF 0.000000 ZAR
3 CHF 0.000775 XAU
4 CHF 32.961405 THB
and I've re-indexed it to be as follows:
rate
from to
CHF CHF 1.000000
MXN 19.675255
ZAR 0.000000
XAU 0.000775
THB 32.961068
...
using df = df.set_index(['from','to'],drop=True, append=False).
I want to simply call get on the dataframe using a pair of indices. For example, I would expect df[['CHF','MXN']] to return 19.675255 but instead an error is raised stating "['CHF' 'MXN'] not in index".
It seems like this should be very straightforward -- what am I doing wrong?
Thanks