选取某行某列
ID A B C D E
1 Foo 1 2 3 4
2 Boo 6 7 8 9
3 Coo 11 12 13 14
4 Foo 11 12 13 14
input: (取单列)
print(df['A'])
out:
ID A
1 Foo
2 Boo
3 Coo
4 Foo
input: (取单列某值)
print(df.loc[df['A'] == 'Foo'])
out:
ID A B C D E
1 Foo 1 2 3 4
4 Foo 11 12 13 14
input: (取某行某列)
print(df[4]['A'])
out:
Foo
https://www.cnblogs.com/to-creat/p/7724562.html
Python数据分析之DataFrame的元素选取(上)
https://baijiahao.baidu.com/s?id=1623401839990655601&wfr=spider&for=pc
Python数据分析之DataFrame的元素选取(中)
https://baijiahao.baidu.com/s?id=1623457789300515396&wfr=spider&for=pc
pandas中关于DataFrame根据ID名称取出某列的数据集
https://blog.csdn.net/weekdawn/article/details/81391495