From 30087697e06c5e64309e891b8ab2c06f78246c10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Dec 2020 08:21:17 +0000 Subject: [PATCH 1/2] Bump pandas from 1.1.5 to 1.2.0 Bumps [pandas](https://github.com/pandas-dev/pandas) from 1.1.5 to 1.2.0. - [Release notes](https://github.com/pandas-dev/pandas/releases) - [Changelog](https://github.com/pandas-dev/pandas/blob/master/RELEASE.md) - [Commits](https://github.com/pandas-dev/pandas/compare/v1.1.5...v1.2.0) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 594c22b74..bab13ed03 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ numpy==1.19.4 -pandas==1.1.5 +pandas==1.2.0 ccxt==1.39.79 aiohttp==3.7.3 From 0d4cf32086f3d9942fb2ae0517da464b5b517457 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 28 Dec 2020 09:50:48 +0100 Subject: [PATCH 2/2] Slightly adapt to pandas incompatibility --- freqtrade/data/btanalysis.py | 2 +- tests/rpc/test_rpc_apiserver.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/data/btanalysis.py b/freqtrade/data/btanalysis.py index 513fba9e7..2b51f5371 100644 --- a/freqtrade/data/btanalysis.py +++ b/freqtrade/data/btanalysis.py @@ -347,7 +347,7 @@ def create_cum_profit(df: pd.DataFrame, trades: pd.DataFrame, col_name: str, # Resample to timeframe to make sure trades match candles _trades_sum = trades.resample(f'{timeframe_minutes}min', on='close_date' )[['profit_percent']].sum() - df.loc[:, col_name] = _trades_sum.cumsum() + df.loc[:, col_name] = _trades_sum['profit_percent'].cumsum() # Set first value to 0 df.loc[df.iloc[0].name, col_name] = 0 # FFill to get continuous diff --git a/tests/rpc/test_rpc_apiserver.py b/tests/rpc/test_rpc_apiserver.py index e7eee6f05..5e608fb25 100644 --- a/tests/rpc/test_rpc_apiserver.py +++ b/tests/rpc/test_rpc_apiserver.py @@ -929,7 +929,7 @@ def test_api_pair_candles(botclient, ohlcv_history): ['2017-11-26 08:55:00', 8.88e-05, 8.942e-05, 8.88e-05, 8.893e-05, 0.05874751, 8.886500000000001e-05, 1, 0, 1511686500000, 8.88e-05, None], ['2017-11-26 09:00:00', 8.891e-05, 8.893e-05, 8.875e-05, 8.877e-05, - 0.7039405, 8.885000000000002e-05, 0, 0, 1511686800000, None, None] + 0.7039405, 8.885e-05, 0, 0, 1511686800000, None, None] ])