From 370b055603167fec5b5de82dd8fa0bef3c84f01a Mon Sep 17 00:00:00 2001 From: Jason Meno Date: Fri, 4 Oct 2019 22:55:45 -0400 Subject: [PATCH] Update sort field Use startDate field instead of creationDate for sorting --- apple_health_xml_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple_health_xml_convert.py b/apple_health_xml_convert.py index b1ab96e..5242ca7 100644 --- a/apple_health_xml_convert.py +++ b/apple_health_xml_convert.py @@ -74,7 +74,7 @@ def convert_xml(): health_df = health_df.reindex(labels=reordered_cols, axis='columns') # Sort by newest data first - health_df.sort_values(by='creationDate', ascending=False, inplace=True) + health_df.sort_values(by='startDate', ascending=False, inplace=True) print("done!")