Skip to content

Commit e99d2b3

Browse files
added comments
1 parent 74db5f1 commit e99d2b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ReadFromCSV.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
__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
44
from matplotlib import style
55

66
style.use("ggplot")
77

88
"""reading data from SalesData.csv file
99
and passing data to dataframe"""
1010

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
1313
y = df["ProductPrice"].as_matrix() # casting ProductPrice to list
1414
plt.xlabel("SalesID") # assigning X-axis label
1515
plt.ylabel("ProductPrice") # assigning Y-axis label

0 commit comments

Comments
 (0)