Am sorting a csv wrt one column but now this string is getting complicated and am not sure how to sort this
Why am still stick with pandas is like i have write back the sorted values back to csv
CSV
Snapshot,Status
21.001.1154_2019-01-04_14-37-47_1280868,Released
21.001.1183_2019-01-04_16-37-47_1280868,Unit Tested
21.001.1183_2019-01-04_14-37-47_1280868,Release
I used:
dd.sort_values(['Snapshot'],ascending=True)
du.to_csv(unit_file,header =True,index=False)
dataframe:
C:\Users\320047585\Sathish\Python>python sample.py
Before Sort
Snapshot Status
0 21.001.1154_2019-01-04_14-37-47_1280868 Released
1 21.001.1183_2019-01-04_16-37-47_1280868 Unit Tested
2 21.001.1183_2019-01-04_14-37-47_1280868 Release
And that returned sorted values,before first _but now if both the ids are same i need to check date and even date is same i need to sort on time,any insights would be great help
Expected output
21.001.1154_2019-01-04_14-37-47_1280868,Released
21.001.1183_2019-01-04_14-37-47_1280868,Released
21.001.1183_2019-01-04_16-37-47_1280868,Unit Tested
Thanks in advance