File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
__author__ = 'vamsi'
2
- import pandas as pd
3
- from matplotlib import pyplot as plt
2
+ import pandas as pd #pandas library to read csv file
3
+ from matplotlib import pyplot as plt #matplotlib library to visualise the data
4
4
from matplotlib import style
5
5
6
6
style .use ("ggplot" )
7
7
8
8
"""reading data from SalesData.csv file
9
9
and passing data to dataframe"""
10
10
11
- df = pd .read_csv ("C:\\ Users\Test\Desktop\SalesData.csv" )
12
- x = df ["SalesID" ].as_matrix () # casting SalesID to list
11
+ df = pd .read_csv ("C:\\ Users\Test\Desktop\SalesData.csv" ) #Reading the csv file
12
+ x = df ["SalesID" ].as_matrix () # casting SalesID to list #extracting the column with name SalesID
13
13
y = df ["ProductPrice" ].as_matrix () # casting ProductPrice to list
14
14
plt .xlabel ("SalesID" ) # assigning X-axis label
15
15
plt .ylabel ("ProductPrice" ) # assigning Y-axis label
You can’t perform that action at this time.
0 commit comments