Created
September 6, 2020 07:08
-
-
Save a-agmon/a610c9493f728173d4e755462f381878 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Show a pie chart of the groups | |
summs = df_avg.cluster.value_counts() | |
cats = np.zeros(len(summs)) | |
for i, x in enumerate(summs): cats[i] = x | |
labels = ['Evening / Night','Normal Day', 'Late Night / Early Morning'] | |
sizes = summs.astype(int) | |
fig1, ax1 = plt.subplots() | |
ax1.pie(sizes, labels=labels, autopct='%1.1f%%',shadow=True, startangle=90) | |
ax1.axis('equal') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment