WITC
WITC

Reputation: 329

Get value of cell using pandas - Python

I have excell file and I used table = pd.read_excel('file.xlsx') in python. I really can not figure it out how to get concrete content o cell - it must be so simple!

I want to write something like table['orange]['addr'] and I want to get 0x8080004 or table['banana']['value'] and get 12

enter image description here

Upvotes: 1

Views: 124

Answers (1)

BENY
BENY

Reputation: 323226

You can do set_index

table = table.set_index('name')

Then you can do your slice with loc

table.loc['orange','addr']
'0x8080004'

Upvotes: 2

Related Questions