Multiple conditions in Pandas

Multiple conditions in pandas are supported with & | operators.

Syntax : Pandas code to filter data frame with multiple conditions
dataframe[(dataframe.column1 > threshold_value) | (dataframe.column2 == filter_value)]


Example
import pandas
data = pandas.DataFrame({'Student Name' : ['Anil', 'Musk'], 
                        'Class' : 1, 
                        'Age' : [6, 7]})
data[(data.Age > 6)|(data.Class == 1)]


Note : ( ) braces separating | operator is very important, without braces pandas would return incorrect result

Output
indexAgeClassStudent Name
061Anil
171Musk