btalib.rsi doesn't work with default index
why btalib.rsi doesn't work with the default pandas dataframe indexing
lst = [1864.90, 1867.24, 1863.73, 1841.16, 1772.16] df = pd.DataFrame(lst, columns=['Close']) rsi = btalib.rsi(df.Close, period=2).df print(rsi)
TypeError: 'slice(2, None, None)' is an invalid key
run-out last edited by
@run-out thanks for your reply. Actually I'm using bta-lib on a data stream so I'm reindexing the dataframe on each incoming message, so any ideas for a better solution ?