text_plain_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)
print(correlation)
plt.figure(figsize=(25, 10))
sns.regplot(x='cocoa_percent', y='rating', data=df)
plt.title('Bean Origin vs Rating', fontsize=14)
plt.xticks(rotation=0)
plt.xlabel('Cacao persentage', fontsize=14)
plt.ylabel('Ratings', fontsize=14)
plt.show()