Skip to content

Instantly share code, notes, and snippets.

@abhishek-shrm
Created April 21, 2020 12:50
Show Gist options
  • Save abhishek-shrm/16f01b11c4572a213dbe568cddf50390 to your computer and use it in GitHub Desktop.
Save abhishek-shrm/16f01b11c4572a213dbe568cddf50390 to your computer and use it in GitHub Desktop.
for date in df_covid['Date'].unique():
diff=set([str(i) for i in range(37)])-set(df_covid[df_covid['Date']==date]['state_id'])
for i in diff:
df_covid=pd.concat([df_covid,pd.DataFrame([[date,'#0073CF',i]],columns=['Date','color','state_id'])],ignore_index=True)
df_covid.sort_values('Date',inplace=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment