How To Create A Pie Chart In Python Using Plotly & Excel | Tutorial [EASY] ๐Ÿ’ป

preview_player
ะŸะพะบะฐะทะฐั‚ัŒ ะพะฟะธัะฐะฝะธะต

๐——๐—˜๐—ฆ๐—–๐—ฅ๐—œ๐—ฃ๐—ง๐—œ๐—ข๐—ก
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€
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

๐—ง๐—ข๐—ข๐—Ÿ๐—ฆ ๐—”๐—ก๐—— ๐—ฅ๐—˜๐—ฆ๐—ข๐—จ๐—ฅ๐—–๐—˜๐—ฆ
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€

๐—–๐—ข๐—ก๐—ก๐—˜๐—–๐—ง ๐—ช๐—œ๐—ง๐—› ๐— ๐—˜
โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€โ–€
โ˜• ๐—•๐˜‚๐˜† ๐—บ๐—ฒ ๐—ฎ ๐—ฐ๐—ผ๐—ณ๐—ณ๐—ฒ๐—ฒ?
ะ ะตะบะพะผะตะฝะดะฐั†ะธะธ ะฟะพ ั‚ะตะผะต
ะšะพะผะผะตะฝั‚ะฐั€ะธะธ
ะะฒั‚ะพั€

Only legit video for making pie charts on YouTube
Hats off. Awesome ๐Ÿ‘

sarikadatta
ะะฒั‚ะพั€

you cant imagine how much problems and struggles i had to face before i saw this video. you are great sir. i pray before god to keep you and your family happy and safe.

arpandas
ะะฒั‚ะพั€

Thanks a lot! This is a great and simple tutorial

kevinlogan
ะะฒั‚ะพั€

Amazing! Please more content like this

jackychan
ะะฒั‚ะพั€

hey bro, just used this, feels awesome. Thanks

ryane
ะะฒั‚ะพั€

Hello Sven, Do you really need to install & import xlrd library for this operation ? I see no need for it ! Am I right or wrong ? Thank you !

eliemoukabed
ะะฒั‚ะพั€

Hi, thankyou so much for this super easy and useful tutorial. I used it for my previous task of PDF files. I used it with the button shown in another video and it works. However, I would like to ask when I run the Python script, the pie chart is saved to the folder, but I want to save the updated pie chart when I click the button. I am getting the updated pie chart in the browser on button click, but the one in the folder is not updated. How would I do that?

zubairrafiq
ะะฒั‚ะพั€

Hello Sven!
Great video, thanks! Tell me please :
How to display the percentage value without a fractional part on the Pie Chart? 10.285% is displayed but 10% is needed.
How to replace a comma delimiter with a space on the Pie Chart? 5, 985 is displayed but 5 985 is needed.
Thanks )

andreyaganin
ะะฒั‚ะพั€

Awesome tutorial! Do you know how I can view the visual from a mobile device? I tried emailing the html file to myself but when I click on it, my mobile screen is blank. Many thanks in advance.

austenlowitz
ะะฒั‚ะพั€

Great video, but in my piechart it outputs each individual row of data when most have the same value. For example, rows 1-5 are all "24" but rows 5-10 are "25". How can I make them group together in the piechart instead of being seperate?

Thank you.

isaacprkr
ะะฒั‚ะพั€

if i have lots of results and i want to only show the top 5 how should i proceed

rosalyna_
ะะฒั‚ะพั€

And if we want to show the pie chart of just 3 elements of category how we do ? Query() ?
Plz urgent

imenenouna
ะะฒั‚ะพั€

if i want to export it in the same excel file what should i do

rosalyna_