Asking again, because my questions was closed before I could make an update.
This is standard sorting by 2 keys and it reverses the result for both keys.
s = sorted(s, key = lambda x: (x['date'], x['id']), reverse=True)
but how can I do reverse only for the first key and if I need to sort by second key it should sort without reversing?
output now
ID DATE
1282 2019-12-19 12:09:28
1281 2019-12-19 12:09:28
1280 2019-12-19 12:09:28
1279 2019-12-19 12:09:27
1278 2019-12-19 12:09:27
1277 2019-12-19 12:09:27
1275 2019-12-19 12:09:27
Desired output
1280 2019-12-19 12:09:28
1281 2019-12-19 12:09:28
1282 2019-12-19 12:09:28
1275 2019-12-19 12:09:27
1277 2019-12-19 12:09:27
1278 2019-12-19 12:09:27
1279 2019-12-19 12:09:27