In [4]:
%%time

trade[(trade['Symbol'] == 'AAPL') & 
      (trade['Sale_Condition'].str.contains('O')) & 
      (trade['Time'] >= np.datetime64('2019-10-07 09:30')) & 
      (trade['Time'] <= np.datetime64('2019-10-07 16:00'))]
CPU times: user 5.56 s, sys: 22.7 ms, total: 5.58 s
Wall time: 486 ms
Out[4]:
Time Exchange Symbol Sale_Condition Trade_Volume Trade_Price Trade_Stop_Stock_Indicator Trade_Correction_Indicator Sequence_Number Trade_Id Source_of_Trade Trade_Reporting_Facility Participant_Timestamp Trade_Reporting_Facility_TRF_Timestamp Trade_Through_Exempt_Indicator
0 2019-10-07 09:30:00.562307 Q AAPL @O X 223839 226.26 None 0 10250 356 N 2019-10-07 09:30:00.562284 None 1