I have a dataframe like this
Name    values   Status          CompletedOn
ac       100    Pending      2019-01-10T03:59:42.184+00:00
as       10     Pending      2019-06-10T03:59:42.184+00:00
sd       10     Closed       2019-12-10T03:59:42.184+00:00
es       10     Closed       2019-12-11T03:59:42.184+00:00
sg       5      Closed       2020-12-10T03:59:42.184+00:00
er       10     optional     2019-12-14T03:59:42.184+00:00
rw       10     optional     2019-12-15T03:59:42.184+00:00
I want to sort them on the basis if list vals=['pending','optional','Closed'] and Completed on Date corresponding to the status.
I have tried sorting by a custom list in pandas but unable to figure out the method to sort them on basis of date also.
So the output Dataframe would be like
Name    values   Status          CompletedOn
ac       100    Pending      2019-06-10T03:59:42.184+00:00
as       10     Pending      2019-01-10T03:59:42.184+00:00
er       10     optional     2019-12-15T03:59:42.184+00:00
rw       10     optional     2019-12-14T03:59:42.184+00:00
sg       5      Closed       2020-12-10T03:59:42.184+00:00
es       10     Closed       2019-12-11T03:59:42.184+00:00
sd       10     Closed       2019-12-10T03:59:42.184+00:00
any help please ?
 
     
    