I want to print all the price open high low and close from one date to another, but it only prints the index. Saturdays and Sundays are not present in the csv file. Here is the code: ...
import datetime as dt
import pandas as pd
backtest_start = dt.datetime(2020,1,1)
backtest_end = dt.datetime(2020,1,31)
curr_day = backtest_start
read_data = pd.read_csv("data.csv")
data = pd.DataFrame(read_data)
data['Date'] = pd.to_datetime(read_data['Date'])
for row in data:
while curr_day < backtest_end:
print(row)
break
curr_day += dt.timedelta(days=1)
... The output I receive is only: Date Open High Low Close