-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathData_Graph.py
More file actions
33 lines (24 loc) · 906 Bytes
/
Data_Graph.py
File metadata and controls
33 lines (24 loc) · 906 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
32
33
import pandas as pd
import matplotlib.pyplot as plt
def data():
test_data = pd.read_csv(r'C:\Users\aaris\Downloads\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.tight_layout(True)
plt.subplots_adjust(left = 0.05, right = 1.0)
plt.show()
def show():
test_data = pd.read_csv(r'Test.csv')
return test_data