Created
April 12, 2023 16:11
-
-
Save srang992/f063d2fa049bff60da0192c5c8eefc88 to your computer and use it in GitHub Desktop.
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
# filtering those companies where Kokoa Kamili is manufactured | |
company_loc_list = list(choco_data[choco_data['bar_name'].isin(['Kokoa Kamili'])]['company_loc']) | |
company_loc_dict = {i:company_loc_list.count(i) for i in company_loc_list} | |
# plotting the data | |
fig = px.pie(values=list(company_loc_dict.values()), | |
names=list(company_loc_dict.keys()), | |
title='Most Common Location where Kokoa Kamili is Manufactured', | |
color_discrete_sequence=px.colors.sequential.Aggrnyl) | |
# customizing the plot | |
fig.update_traces(textposition='inside', textinfo='percent+label') | |
fig.update_layout(uniformtext_minsize=12) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment