forked from Aaris-Kazi/Data-Visualization-Using-Matplotlib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathData_Graph.py
More file actions
31 lines (22 loc) · 826 Bytes
/
Data_Graph.py
File metadata and controls
31 lines (22 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import pandas as pd
import matplotlib.pyplot as plt
def data():
test_data = pd.read_csv(r'C:\Users\User\Desktop\Data-Visualization-Using-Matplotlib-master\Test.csv')
print(test_data)
i = test_data[test_data.Name == 'Afif plaavkar']
j = test_data[test_data.Name == 'Sakib Arkate']
k = test_data[test_data.Name == 'Khan Osama']
result = test_data[test_data.Subject =='AVG TH + PR']
print(result)
plt.plot(i.Subject,i.Attendance)
plt.plot(j.Subject,j.Attendance)
plt.plot(k.Subject,k.Attendance)
plt.legend(['Afif', 'Sakib','Osama'])
plt.xlabel('Subject Code')
plt.ylabel('Attendace Percentage')
plt.grid(True)
plt.title('Attendance of every subject')
plt.show()
def show():
test_data = pd.read_csv(r'Test.csv')
return test_data