Skip to content

Instantly share code, notes, and snippets.

@zachlim98
Created January 22, 2021 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachlim98/78c9be9992cdaee8af7486ec6aeda577 to your computer and use it in GitHub Desktop.
Save zachlim98/78c9be9992cdaee8af7486ec6aeda577 to your computer and use it in GitHub Desktop.
jap_std_DR = ((japanew.iloc[:,1]/japanew.iloc[:,2])*((japanew.iloc[:,2]/japanew.iloc[:,2].sum()+japanew.iloc[:,4]/japanew.iloc[:,4].sum())/2)).sum()
ew_std_DR = ((japanew.iloc[:,3]/japanew.iloc[:,4])*((japanew.iloc[:,4]/japanew.iloc[:,4].sum()+japanew.iloc[:,2]/japanew.iloc[:,2].sum())/2)).sum()
print("Japan Standardized Death Rate: %.5f" %jap_std_DR)
print("England/Wales Standardized Death Rate: %.5f" %ew_std_DR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment