【发布时间】:2022-01-20 06:03:25
【问题描述】:
我知道 pandas 提供了多种索引数据的方法,我想知道从性能的角度来看,以下两种方法是否有区别,即哪一种更快或两者相同?
# method 1
df = table.loc[table.some_col==True, :]
# method 2
df = table[table.some_col==True]
【问题讨论】:
-
以下帖子是否回答了您的问题? stackoverflow.com/questions/37757844/…