0% found this document useful (0 votes)
89 views1 page

Module 5 - 2

The document contains code to generate three plots from sales data: 1) a line plot showing total monthly sales in 2011, which will identify the month with the lowest sales, 2) a pie chart showing the country-wise contribution to total sales in 2011, which will identify the highest contributing country, and 3) a scatter plot of invoice amounts vs invoice numbers to identify the range where most invoice amounts are concentrated.

Uploaded by

deepakkashya
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
0% found this document useful (0 votes)
89 views1 page

Module 5 - 2

The document contains code to generate three plots from sales data: 1) a line plot showing total monthly sales in 2011, which will identify the month with the lowest sales, 2) a pie chart showing the country-wise contribution to total sales in 2011, which will identify the highest contributing country, and 3) a scatter plot of invoice amounts vs invoice numbers to identify the range where most invoice amounts are concentrated.

Uploaded by

deepakkashya
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1/ 1

1.1. Plot Total Sales Per Month for Year 2011.

How the total sales have increased


over months in Year 2011. Which month has lowest Sales?

import numpy,matplotlib.pyplot as map,pandas


import datetime as dt,re

data=pandas.read_csv('F:/Usman/BigMartSalesData.csv')
map.plot(data.Month,data.Amount)

map.xlabel('Month')
map.ylabel('Amount')
map.grid(True)
map.title('Total Sales Per Month for Year 2011')

map.show()

3. Plot Pie Chart for Year 2011 Country Wise. Which Country contributes highest
towards sales?

import numpy,matplotlib.pyplot as map,pandas


import datetime as dt,re

data=pandas.read_csv('F:/Usman/BigMartSalesData.csv')
map.pie(data.Amount,labels=data.Country)
map.figure(figsize=(4,4))
map.grid(True)
map.title('Total Sales Per Month for Year 2011')

map.show()

4. Plot Scatter Plot for the invoice amounts and see the concentration of amount.
In which range most of the invoice amounts are concentrated

data=pandas.read_csv('F:/Usman/BigMartSalesData.csv')
map.scatter(data.Amount,data.InvoiceNo)

map.grid(True)

map.show()

You might also like