📜  熊猫在有条件的列中查找值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:19.893000             🧑  作者: Mango

代码示例1
# The common syntax is df.loc[], the condition is put in the bracket

#Eg, look for rows with column1 > 5 and column2 = 3
df.loc[(df['column_1'] > 5) & (df['column_2'] = 3)]