-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_data.py
More file actions
36 lines (29 loc) · 769 Bytes
/
Copy pathcreate_data.py
File metadata and controls
36 lines (29 loc) · 769 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
34
35
36
import pandas as pd
students = pd.DataFrame({
"student_id": [1, 2, 3, 4, 5],
"name": [
"Lebohang",
"Themba",
"Rorisang",
"David",
"Thamsanqa"
]
})
math = pd.DataFrame({
"student_id": [1, 2, 3, 4, 5],
"math_score": [85, 78, 98, 90, 95]
})
science = pd.DataFrame({
"student_id": [1, 2, 3, 4, 5],
"science_score": [78, 88, 73, 92, 90]
})
attendance = pd.DataFrame({
"student_id": [1, 2, 3, 4, 5],
"attendance_percent": [90, 88, 98, 99, 93]
})
# Convert data into csv files
students.to_csv("data/students.csv", index=False)
math.to_csv("data/math.csv", index=False)
science.to_csv("data/science.csv", index=False)
attendance.to_csv("data/attendance.csv", index=False)
print("Data created!")