Pandas > Select data using multiple conditions

Name
Code
Output
dataframe = pandas.DataFrame(numpy.random.randint(0,100,size=(5, 4)), columns=['C1','C2','C3','C4'])
print ("dataframe")
print (dataframe)
print ("dataframe conditional selection")
print (dataframe[(dataframe['C1']>50) & ((dataframe['C2']<25)| (dataframe['C2']>75))])
dataframe
   C1  C2  C3  C4
0  72  23  21   1
1  59  67  77  59
2  47  49  34   6
3  28   8  66  97
4  91   4  44  37
dataframe conditional selection
   C1  C2  C3  C4
0  72  23  21   1
4  91   4  44  37