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
train(
File "/workspace/FinRL/finrl/train.py", line 33, in train
data = dp.add_technical_indicator(data, technical_indicator_list)
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/finrl/meta/data_processor.py", line 52, in add_technical_indicator
df = self.processor.add_technical_indicator(df, tech_indicator_list)
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/finrl/meta/data_processors/processor_yahoofinance.py", line 253, in add_technical_indicator
df = df.merge(
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/pandas/core/frame.py", line 10093, in merge
return merge(
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 110, in merge
op = _MergeOperation(
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 707, in init
self._maybe_coerce_merge_keys()
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 1346, in _maybe_coerce_merge_keys
raise ValueError(msg)
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
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.
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
train(
File "/workspace/FinRL/finrl/train.py", line 33, in train
data = dp.add_technical_indicator(data, technical_indicator_list)
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/finrl/meta/data_processor.py", line 52, in add_technical_indicator
df = self.processor.add_technical_indicator(df, tech_indicator_list)
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/finrl/meta/data_processors/processor_yahoofinance.py", line 253, in add_technical_indicator
df = df.merge(
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/pandas/core/frame.py", line 10093, in merge
return merge(
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 110, in merge
op = _MergeOperation(
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 707, in init
self._maybe_coerce_merge_keys()
File "/home/user/anaconda3/envs/FinRL/lib/python3.9/site-packages/pandas/core/reshape/merge.py", line 1346, in _maybe_coerce_merge_keys
raise ValueError(msg)
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
To Reproduce Steps to reproduce the behavior:
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):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.