Tema Pachete Pyton

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

import pandas as pd

import matplotlib.pyplot as plt


plt.pie(sizes, explode=explode, labels=labels, colors=colors,
df = pd.read_csv('phone_data.csv')
print('Durata insumata pentru fiecare luna')
print(df.groupby('month')['duration'].sum())

# Data to plot
labels = 'Ian', 'Feb', 'Mar', 'Apr', 'Mai' , 'Iun' , 'Iul' , 'Aug' , 'Sep' ,
'Oct' , 'Nov' , 'Dec'
sizes = [215, 130, 245, 210]
colors = ['gold', 'yellowgreen', 'lightcoral', 'lightskyblue']
explode = (0.1, 0, 0, 0) # explode 1st slice

# Plot
plt.pie(sizes, explode=explode, labels=labels, colors=colors,
autopct='%1.1f%%', shadow=True, startangle=140)

plt.axis('equal')
plt.show()

You might also like