0

I want to get the position of some data.

This is a part of my data: enter image description here

partial_coe[0] is my data's variable's name.

I want to get a data like this, using index and columns:

partial_coe[0].iloc['(600000.SH, 600015.SH)']['600000.SH']

But the error is below:

TypeError: cannot do positional indexing on <class 'pandas.core.indexes.base.Index'> with these indexers [(600000.SH, 600015.SH)] of <class 'str'>

How to get this data using the index and columns?

taylor
  • 457
  • 1
  • 5
  • 17
  • Please read [how to make good reproducible pandas examples](http://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples) and edit your post correspondingly. – MaxU - stand with Ukraine Dec 10 '17 at 12:49

1 Answers1

0

Try the following if your DF has a Multi-Index:

partial_coe[0].loc[('600000.SH', '600015.SH'), '600000.SH']
MaxU - stand with Ukraine
  • 205,989
  • 36
  • 386
  • 419