M
M
Mikhail Mikhail2021-06-30 20:16:14
Python
Mikhail Mikhail, 2021-06-30 20:16:14

How to use Pandas to look for values ​​at the intersection of cells?

60dca654607f5248185397.png
There is such an Excel table, I can’t understand how to search for data at the intersection using iloc For example, if you specify 1 and rr, it will return the value from the table, that is, 1rr, if you know how to do this, please give an example code. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmshar, 2021-06-30
@latty337

What's the sample code? This one, right? Note that iloc searches by index-number, while loc searches by index-value. In your specific example - they (number and value) differ by 1.
df.rr.loc[1]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question