Created
April 21, 2020 12:46
-
-
Save abhishek-shrm/7594c2dea3dbf95816695a7808de9009 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
# Coloring states and UTs with active COVID-19 cases | |
df_covid['color']=pd.cut(df_covid['Active Cases'],bins,labels=['#FFEBEB','#F8D2D4','#F2B9BE','#EBA1A8','#E58892','#DE6F7C','#D85766','#D13E50','#CB253A','#C50D24'],include_lowest=False) | |
# Coloring states and UTs with no active cases but previously had | |
df_covid['color'].replace(np.nan,'#32CD32',inplace=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment