0

Matplotlib

How to add Val above barchart?

import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline

df = pd.read_csv('data/FGA Challenge 1/menu.csv') # Read the dataset
df.Category.value_counts()
df.groupby("Category").Calories.mean().round(2)
df.groupby("Category").Calories.mean().round(2).plot.bar(rot=0,figsize=(15,8),color="orange", legend=True
plt.ylabel('Cal')
plt.title('Rata-rata Kalori Untuk Setiap Kategori (Cal)')
Michael Szczesny
  • 4,911
  • 5
  • 15
  • 32

0 Answers0