Skip to content

Instantly share code, notes, and snippets.

@casarock
Created May 19, 2020 08:10
Show Gist options
  • Save casarock/e6a6eabd629fe10650fb02a1ed76e904 to your computer and use it in GitHub Desktop.
Save casarock/e6a6eabd629fe10650fb02a1ed76e904 to your computer and use it in GitHub Desktop.
Calculating growth
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