text_html_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df = pd.read_csv('../input/chocolate-bar-ratings/chocolate_bars.csv')

plt.xticks(rotation=90)

y = df['cocoa_percent']
x = df['rating']
correlation = y.corr(x)
plt.xticks(rotation=0)

plt.figure(figsize=(25, 10))
df.groupby('company_location').mean()['rating'].plot(kind='bar', color='tan')
plt.xticks(rotation=90)
plt.xlabel('Company location', fontsize=14)
plt.ylabel("Rating'", fontsize=14)
plt.title('Company location versus rating', fontsize=14)
plt.show()