#!/usr/bin/env python # coding: utf-8 # # Data Import # In[1]: import matplotlib.pyplot as plt import pandas as pd #Please adjust to your file df=pd.read_excel("/Users/davidmika/Desktop/First.xlsx","Sheet1") # # Line Chart # In[2]: # Group sum of sales at BMI level var = df.groupby('BMI').Sales.sum() fig = plt.figure() ax = fig.add_subplot(1,1,1) #Here you can change labels and title ax.set_xlabel('BMI') ax.set_ylabel('Sum of Sales') ax.set_title("BMI wise Sum of Sales") var.plot(kind='line') #Show bar chart plt.show() # In[ ]: