Python 3.9.13 (main, Jul 5 2022, 16:17:50)
[GCC 12.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> s="""Date, 1, 2, 3, 4
... 2010-02-04, 213.429998, 214.499996, 212.38000099999996, 214.009998,
... 2010-03-05, 214.599998, 215.589994, 213.249994, 214.379993
... 2010-04-06, 214.379993, 215.23, 210.750004, 210.969995
... 2010-05-07, 211.75, 212.000006, 209.050005, 210.58
... 2010-06-08, 210.299994, 212.000006, 209.06000500000002, 211.98000499999998"""
>>> data=[line.split(',') for line in s.split('\n')]
>>> sorted(data[1:], key=lambda m: m[0], reverse=True)
[['2010-06-08', ' 210.299994', ' 212.000006', ' 209.06000500000002', ' 211.98000499999998'], ['2010-05-07', ' 211.75', ' 212.000006', ' 209.050005', ' 210.58'], ['2010-04-06', ' 214.379993', ' 215.23', ' 210.750004', ' 210.969995'], ['2010-03-05', ' 214.599998', ' 215.589994', ' 213.249994', ' 214.379993'], ['2010-02-04', ' 213.429998', ' 214.499996', ' 212.38000099999996', ' 214.009998', '']]
>>>