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_visual.py
More file actions
37 lines (29 loc) · 1.03 KB
/
data_visual.py
File metadata and controls
37 lines (29 loc) · 1.03 KB
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
34
35
36
37
import pandas as pd
import matplotlib.pyplot as plt
def data_vis():
print('\t\tWelcome to Attendace Stats')
x = input('Enter the Name:\t')
test_data = pd.read_csv(r'C:\Users\User\Desktop\Data-Visualization-Using-Matplotlib-master\Test.csv')
i = test_data[test_data.Name == x]
print(i)
plt.bar(i.Subject,i.Attendance)
plt.legend([x])
plt.xlabel('Subject Code')
plt.ylabel('Attendace Percentage')
plt.grid(True)
plt.title('Attendance of every subject')
plt.show()
result = test_data[test_data.Subject =='AVG TH + PR']
print(result)
def data_vis1(x):
print('\t\tWelcome to Attendace Stats')
test_data = pd.read_csv(r'C:\Users\User\Desktop\Data-Visualization-Using-Matplotlib-master\Test.csv')
i = test_data[test_data.Name == x]
print(i)
plt.bar(i.Subject,i.Attendance)
plt.legend([x])
plt.xlabel('Subject Code')
plt.ylabel('Attendace Percentage')
plt.grid(True)
plt.title('Attendance of every subject')
plt.show()