From 09261fa77e88ee3b25a7cbd7ef526045b51175c2 Mon Sep 17 00:00:00 2001 From: epitaxy Date: Tue, 16 Aug 2022 01:39:14 +0000 Subject: [PATCH] First Commit --- base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base.py b/base.py index 6698a5e..250d4a9 100644 --- a/base.py +++ b/base.py @@ -1,10 +1,11 @@ from operator import itemgetter -# convertion of Json Data to list +# convertion of Json Data to list by selecting columns state, time = list( zip(*[ (x['state'], x['last_updated']) for x in raw_data])) # another converion thorugh itemgetter (a little faster) state, time = list( zip( *map(itemgetter('state', 'last_updated'), raw_data) )) +# each state = list(map(itemgetter('state'), raw_data)) \ No newline at end of file