I have stock prices as df in this shape
I'm trying to find to find the lower low as I move from row to row and also higher high using the following code
while i<5:
print('index value',i)
if prices_df.loc[[i],['low']] < ll:
ll = prices_df.loc[[i],['low']]
print('ll update to', ll, "while i=", i)
elif prices_df.loc[[i],['high']] >hh:
hh = prices_df.loc[[i],['high']]
print('hh update to', hh, "while i=",i)
i += 1
continue
but I got the following error
Can only compare identically-labeled DataFrame objects
ValueError: Can only compare identically-labeled DataFrame objects