filmov
tv
How To Create A Pie Chart In Python Using Plotly & Excel | Tutorial [EASY] ๐ป
ะะพะบะฐะทะฐัั ะพะฟะธัะฐะฝะธะต
๐๐๐ฆ๐๐ฅ๐๐ฃ๐ง๐๐ข๐ก
โโโโโโโโโโโโโโโโโโโโโโโโโโ
Did you know you can use Python code to create a pie chart? This is a tutorial that will show you how to create one using Python. For this particular tutorial, we will be using Plotly & Excel.
You can do all the changes in the excel file and after running the script again you will have your updated pie chart.
The Pie Chart is also interactive. If you hover over the chart, you will see the percent share for each category and you can even hide/unhide certain categories dynamically. The final chart will be also saved in a HTML file. Hence, you could also send the chart to your friends & colleagues, who do not even need to have Python installed on their machines.
This tutorial is focusing on beginners in Python. Even you have never written a single line of code in Python, you will be able to have your pie chart by the end of this tutorial.
โ Chapters:
0:00 Demo
0:45 Tutorial
6:30 Outro
===================================================
๐ฉโ๐ป SOURCE CODE:
import pandas as pd
import plotly
# Read data from excel
values = df['Results']
names = df['Category']
values=values,
names=names,
title='Survey Results'
)
textposition='inside',
textinfo='percent+label'
)
title_font_size = 42,
)
# Export Waterfall to HTML
๐ง๐ข๐ข๐๐ฆ ๐๐ก๐ ๐ฅ๐๐ฆ๐ข๐จ๐ฅ๐๐๐ฆ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
๐๐ข๐ก๐ก๐๐๐ง ๐ช๐๐ง๐ ๐ ๐
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐๐๐ ๐บ๐ฒ ๐ฎ ๐ฐ๐ผ๐ณ๐ณ๐ฒ๐ฒ?
ะะพะผะผะตะฝัะฐัะธะธ