I have a CSV file which I want matplotlib to create a bar chart for. However, the CSV has headings which are interfering. Here is the code I am using to try make matplotlib ignore the two headings so it can run the bar chart. I am also including an image of what the CSV file actually looks like versus what I'm trying to get matplotlib to read in
The error I am getting when I run this code is "key error: COST"
How do I resolve this and allow the code to ignore the COUNTRY and COST headings
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('Europe.csv',sep=';')
price = df['COST']
countries = df['COUNTRY']
plt.style.use('grayscale')
plt.bar( countries, price, label='Europe', color='red')
plt.ylabel('Price in US$')
plt.title('Cost of spotify premium per country')
plt.xticks(rotation=90)
plt.legend(loc='best')
plt.show()