Created
May 19, 2020 08:10
-
-
Save casarock/e6a6eabd629fe10650fb02a1ed76e904 to your computer and use it in GitHub Desktop.
Calculating growth
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_weekly_growth(self): | |
frame = self.germany.tail(7) | |
actual = frame['sum'][-1] | |
days_before = frame['sum'][0] | |
growth_rate = (actual*100/days_before) - 100 | |
return growth_rate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment