From 5ed64c4b0bf694e47aa11b8f0f150b7bc79e8c09 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Wed, 4 Sep 2019 14:18:49 +1000 Subject: [PATCH] Fix timestamp sorting --- bom-wind/bom_wind.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bom-wind/bom_wind.py b/bom-wind/bom_wind.py index 6dc1284..d88f7e8 100644 --- a/bom-wind/bom_wind.py +++ b/bom-wind/bom_wind.py @@ -78,6 +78,7 @@ df = pd.DataFrame(json_data['observations']['data']) # Set local time as index df.index = pd.to_datetime(df['local_date_time_full']) +df = df.sort_index() # Extract columns of interest df = df[cols]