FinRL
FinRL copied to clipboard
Error ValueError: You are trying to merge on object and datetime64[ns, America/New_York] columns. in processor_yahoofinance.py
Describe the bug
Error in processor_yahoofinance.py, def add_technical_indicator
ValueError: You are trying to merge on object and datetime64[ns, America/New_York] columns. If you wish to proceed you should use pd.concat
File "/workspace/FinRL/finrl/train.py", line 110, in
To Reproduce Steps to reproduce the behavior:
- Run main.py or train.py from finrl folder. After the data is downloaded, error in data processor, adding indicators.
Expected behavior main or train.py to run without error.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
pls use pd.concat
seem the problem exists, the root cause is df.timestamp and indicator.timestamp object type is not match.
https://github.com/AI4Finance-Foundation/FinRL/blob/3393f62e65248a15f1ff5a289c2ed82860fc30fb/finrl/meta/data_processors/processor_yahoofinance.py#L256