Skip to content

Instantly share code, notes, and snippets.

Created Feb 12, 2021
What would you like to do?
df.drop(df.tail(1).index, inplace = True)
df1 = df.sort_values(by='active', ascending=False)
df3 = df1[:5]
states = df3.state_name
active =
colours = ["skyblue", "blue", "purple", "yellow", "red"]
plt.pie(active, labels=states, colors=colours)
plt.rc('font', size=12)
plt.title("Top 5 Active cases", fontsize=20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment