stocktrends
stocktrends copied to clipboard
Key not found error when I pass tail items to Renko
Hello,
I was getting a "Key not found error". On investigating on the source code I understood df.tail(n).loc[0] does not work. I was using this approach as I noticed a performance issue when there were too many items in panda list. Instead of sending the entire list I was sending tail of 50 items to create the Renko chart and it started breaking. I changed in my local loc[0] to iloc[0] and it worked for me.
The code which was breaking and what I did to fix
self.cdf.loc[0] = self.df.iloc[0]
Hope this helps.
Praneeth