Created
June 2, 2020 14:20
-
-
Save rohitrajiit/7549be816c42fd989a011f6083011123 to your computer and use it in GitHub Desktop.
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
monthwise = df.groupby(['district','month']).last()['confirmed'].unstack() | |
monthwise['growth'] = monthwise[5]/monthwise[4] | |
growth = monthwise.drop(6, axis=1)[monthwise[5]>1000].dropna(subset=['growth']) | |
growth = growth.sort_values(by=['growth'], ascending = False) | |
growth.rename(columns ={4: 'Last day of April', 5: 'Last day of May'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment