Here is a dataframe:
timestamp open high low close volume
0 2023-01-03 09:30:00 3.5000 3.5800 3.5000 3.5300 1595.0
1 2023-01-03 09:35:00 3.5800 3.5800 3.5800 3.5800 102.0
2 2023-01-03 09:40:00 3.5972 3.5972 3.5972 3.5972 103.0
3 2023-01-03 09:50:00 3.5500 3.5700 3.5000 3.5200 3032.0
4 2023-01-03 09:55:00 3.4100 3.5900 3.4100 3.5900 2205.0
... ... ... ... ... ... ...
1245 2023-02-21 19:35:00 6.7100 6.7200 6.7100 6.7200 739.0
1246 2023-02-21 19:40:00 6.7200 6.7300 6.7200 6.7300 2243.0
1247 2023-02-21 19:45:00 6.7300 6.7300 6.7000 6.7000 1412.0
1248 2023-02-21 19:50:00 6.7100 6.7400 6.7000 6.7400 4082.0
1249 2023-02-21 19:55:00 6.7400 6.8500 6.6500 6.7200 23678.0
[1250 rows x 6 columns]
For each day, how can I extract the lowest price in the low
column between 4:00 and 9:30 and put it in a list?
Here is what I tried:
pre_market_low_list = []
for date in olhc.timestamp.dt.date.unique():
pre_market_low_list.append(pre_market_low(olhc[olhc.timestamp.dt.date == date].low))