I've got a bunch of strings in this format.
[24/4/2018 15:47:20] doctor's appt
[22/8/2016 11:47:09] workshop @ block 3
[24/4/2018 15:45:33] buy eggs
[31/2/2017 13:44:40] good day
[31/2/2017 13:44:35] flight
I'm trying to sort them in an ascending order according to the date and time using Python but I can't really figure it out. I'd really appreciate some help.
Edit: Hi guys thanks a lot for taking out your time to help me out here. Was able to solve it, appreciate it.
sort()admits an optional parameterkeythat would allow to use a function to extract the dates and convert them to datetimes. But maybe a different solution could be more suitable for a dataframe.31/2/2017is not a valid date. There is no 31st of February.