Created
July 31, 2020 14:44
-
-
Save roymartinezblanco/b907c11ddf16190bc24494b3bfd40dcf to your computer and use it in GitHub Desktop.
First vs Third Party
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
tmp = dat_clean | |
tmp = tmp.groupby(['host','host-type','url']).size().reset_index(name='Count') | |
tmp = tmp.groupby(['host-type']).sum().reset_index() | |
tmp = tmp.sort_values(by=['Count'],ascending=False) | |
plt.pie(tmp['Count'],labels=tmp['host-type'],shadow=False,autopct='%1.1f%%') | |
plt.title('First vs Third Party') | |
plt.axis('equal') | |
plt.tight_layout() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment