[行番号, 列名]で値取得

# 列名のみのデータフレーム作成
df = pd.DataFrame({'person':['a','b','c','a','b','c'],\
                  'name':['aa','bb','cc','aaa','bbb','ccc'],\
                  'num':[100,200,300,1000,2000,3000]})

    person  name    num
0   a   aa  100
1   b   bb  200
2   c   cc  300
3   a   aaa 1000
4   b   bbb 2000
5   c   ccc 3000
df.at[df.index[0], "person"]
> a

Pandas,Python

Posted by vastee