I am sorting an amount of information of a GitLab-issues export and to then sort this information according to their date but the sortfunction doesnt work.
data = pd.read_csv('09.csv',sep=',', header='infer')
test = data[data["Title"].str.contains('xMS::001|iMS::000_Restart_ILASC_Implementation', na=False)]
test.loc[:, 'Due Date'] = pd.to_datetime(test['Due Date'], errors='coerce')
test2=test.sort_values(by=['Due Date'], ascending=False)
#print(tasks)
with pd.ExcelWriter('v34.xlsx', engine='openpyxl', mode='a',if_sheet_exists='overlay') as writer:
test2.to_excel(writer, index=False, startrow= 15, startcol=1)
To test this I let the script run four times: two times with the basic code, the other times I created a new dataframe for the sorted objects. In both cases I tested with ascending true and false. In all cases I got the same result. The sortment of my dataframe didnt change.
2