pandas-ta: Error with df.ta.strategy("All")
Which version are you running? The lastest version is on Github. Pip is for major releases.
Python: 3.8.6
pandas-ta: 0.2.23b0
Upgrade.
done
Describe the bug A clear and concise description of what the bug is.
These examples fails on the latest version:
The Default Strategy is the ta.AllStrategy. The following are equivalent:
df.ta.strategy() df.ta.strategy(“All”) df.ta.strategy(ta.AllStrategy)
Specifying specific categories work ([‘candles’, ‘momentum’, ‘overlap’, ‘performance’, ‘statistics’, ‘trend’, ‘volatility’, ‘volume’])
These have no effect on the result: dataframe.ta.mp = True dataframe.ta.mp = False
Error:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/opt/tradebot/freqtrade/.env/lib/python3.8/site-packages/pandas_ta/core.py", line 432, in _mp_worker
return getattr(self, method)(*args, **kwargs)
TypeError: crossed() got an unexpected keyword argument 'append'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./.env/lib/python3.8/site-packages/pandas_ta/core.py", line 682, in strategy
[self._post_process(r, **kwargs) for r in results]
File "./.env/lib/python3.8/site-packages/pandas_ta/core.py", line 682, in <listcomp>
[self._post_process(r, **kwargs) for r in results]
File "/usr/lib/python3.8/multiprocessing/pool.py", line 448, in <genexpr>
return (item for chunk in result for item in chunk)
File "/usr/lib/python3.8/multiprocessing/pool.py", line 868, in next
raise value
TypeError: crossed() got an unexpected keyword argument 'append'
To Reproduce Download sample data and try the above examples.
Expected behavior All indicators added to dataframe.
Thanks for using Pandas TA! Thanks for a great TA library!
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (10 by maintainers)
@Fredrik81,
Gotcha
Yeah I understand. For the resultant column names, “[indicator]_[settings]” seemed to be the least problematic and yet descriptive way to identify them. Obviously the “.” column names from indicators with float parameters makes the process less smooth in the AI/ML pipeline. I am open to suggestions for better column naming.
Yes, this works and is a simple command to adjust column names in the feature generation post-processing phase of the pipeline. I have thought about adding something similar to Pandas TA but unsure if it is needed as post-processing requirements may vary.
Kind Regards, KJ
yeah that did the tick now it’s working perfectly!