Using pandas-ta library on python 3.10.
I'm trying to write a function that gets a data frame and a list of indicator names as strings, then for each name in the list, add it as an indicator to the data frame.
For example, trying to do something like this:
import pandas_ta as ta
df = pd.DataFrame(data=BTC-USD)
indicators = ['rsi', 'obv']
for x in indicators:
df[f'{x}'] = ta.x(df['close'])
for reference, to add an rsi indicator:
df['rsi'] = ta.rsi(df['close'])
So the issue is, that when trying to run the loop, I get an Attribute error:
AttributeError: module 'pandas_ta' has no attribute 'x'
Any ideas on how to get around it maybe? I'm fairly new to python so if there's an obvious way that im missing, pardon me
this is one of the data frames im getting this issue on: https://easyupload.io/x952ul
this is what the csv looks like
I'll edit again if I see a better way to share the csv here.