diff --git a/assopy/stats.py b/assopy/stats.py index c6ef1c7f6..3f7daf267 100644 --- a/assopy/stats.py +++ b/assopy/stats.py @@ -193,7 +193,8 @@ def _calc_prices(order_id, items): # Replace prices dicts with sorted lists for code in tcp.keys(): prices_list = [entry - for price, entry in sorted(tcp[code]['prices'].items())] + for price, entry in sorted(tcp[code]['prices'].items(), + reverse=True)] tcp[code]['prices'] = prices_list # Create list sorted by fare code ticket_sales = [entry for code, entry in sorted(tcp.items())]