Fix missing DataFrame in advanced docs

This commit is contained in:
Matthias 2022-01-04 19:54:50 +01:00
parent 42579c0268
commit 67e4dda5b3

View File

@ -222,9 +222,9 @@ should be rewritten to
```python ```python
frames = [dataframe] frames = [dataframe]
for val in self.buy_ema_short.range: for val in self.buy_ema_short.range:
frames.append({ frames.append(DataFrame({
f'ema_short_{val}': ta.EMA(dataframe, timeperiod=val) f'ema_short_{val}': ta.EMA(dataframe, timeperiod=val)
}) }))
# Append columns to existing dataframe # Append columns to existing dataframe
merged_frame = pd.concat(frames, axis=1) merged_frame = pd.concat(frames, axis=1)