Pair name-based sorting.

Attempt at more rational string sorting. Change test to show not working as expected.
This commit is contained in:
Leif Segen
2020-11-28 11:33:25 -06:00
parent 03c5714399
commit 6a74c57c3d
2 changed files with 2 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ class PerformanceFilter(IPairList):
# set initial value for pairs with no trades to 0
# and sort the list using performance and count
sorted_df = list_df.merge(performance, on='pair', how='left')\
.fillna(0).sort_values(by=['profit', 'count'], ascending=False)
.fillna(0).sort_values(by=['profit', 'count', 'pair'], ascending=False)
pairlist = sorted_df['pair'].tolist()
return pairlist