Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# 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