Pandas中根据列的值选取多行数据

知识点:通过标签进行选择 .loc[]

 

 df2 = df1.loc[df['c'] == 1]

即可!

 

参考文档:

https://www.cnblogs.com/everfight/p/pandas_select_rows.html

 

posted @ 2020-05-23 22:17  半日闲1  阅读(353)  评论(0编辑  收藏  举报