Created
May 19, 2020 08:09
-
-
Save casarock/bd3cccae253b52184954aab66ff11c84 to your computer and use it in GitHub Desktop.
Calculating interesting stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_actual_infected(self): | |
germany_changed = self.germany.tail(2)['sum'][1] - self.germany.tail(2)['sum'][0] | |
overall_changed = self.overall.tail(2)['sum'][1] - self.overall.tail(2)['sum'][0] | |
germany = '+' if germany_changed > 0 else '-' | |
overall = '+' if overall_changed > 0 else '-' | |
germany += str(germany_changed) | |
overall += str(overall_changed) | |
return { | |
'germany': [ | |
self.germany.tail(1)['sum'][0], | |
germany | |
], | |
'overall': [ | |
self.overall.tail(1)['sum'][0], | |
overall | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment