how to create a pie chart from csv file using python

Ganesha

I have this CSV data file, I'm trying to make a pie chart using this data

I'm a beginner in python and don't understand how to create a pie chart using the three columns, please help!

working solution code would be more helpful!

My code:

import pandas as pd
import matplotlib.pyplot as plt 

df = pd.read_csv ('chart_work.csv')

product_data = df["Product Name;"]   
bug_data = df["Number Of Bugs"]                      
colors = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#8c564b"]    

plt.pie(bug_data , labels=product_data , colors=colors,
autopct='%1.1f%%', shadow=True, startangle=140)

plt.show()

the pie chart which is outputed by this code is distorted, any help?

Chart I'm getting:

enter image description here

Ashok Rayal

This is very simple.

import pandas as pd
from matplotlib.pyplot import pie, axis, show
%matplotlib inline

df = pd.read_csv ('chart_work.csv')

sums = df.groupby(df["Product Name;"])["Number Of Bugs"].sum()
axis('equal');
pie(sums, labels=sums.index);
show()

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to create a pie chart using matplotlib from csv

How to create pie chart using python ?

Python Pie chart using CSV

Python: How does one create a pie chart from a database?

Python Pie chart from CSV data

How to create pie chart?

Create Pie Chart using data extracted from Firebase Firestore in Java

Using pandas excel workbook to create pie chart from 1 column

plot stacked bar chart from csv file using python

I want to create a pie chart using a dataframe column in python

How to create a nested pie chart

How do I create a pie chart using categorical data in matplotlib?

How do I create a pie chart using Bokeh?

How to create multi ring donut pie chart using amcharts?

How do I create a pie chart from VML shapes?

How to create a pie-chart from pandas DataFrame?

How to remove decimal places from project using Mikephil pie chart

how to generate pie chart using dict_values in Python 3.4?

plotting pie chart from csv data?

How do I create and append data from csv file to big query and partition the table using python?

How to create a dataframe from csv file without the index column (using python pandas)?

Create donut using pie chart with custom labels

Create Pie Chart Using JSON Data React

how to show legend in PIE chart from chart to pie drilldown highcharts

How to create single value Doughnut or Pie chart using Chart.js?

How do you create a pie chart of subitems using a crossfiltered powered dc.js chart?

Create a bargraph/pie chart of column sums in python

How to make a bubble chart from CSV file?

How to create a pie chart with Rstudio flexdashboard?