FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
datacode/retype.py at master · scanfyu/datacode · GitHub
scanfyu
/
datacode
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
datacode
/
retype.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (28 loc) · 1.33 KB
Breadcrumbs
datacode
/
retype.py
Copy path
File metadata and controls
39 lines (28 loc) · 1.33 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
38
39
import
unicodecsv
def
read_csv
(
filename
):
with
open
(
filename
,
'rb'
)
as
f
:
reader
=
unicodecsv
.
DictReader
(
f
)
return
list
(
reader
)
enrollments
=
read_csv
(
'F:
\\
data
\\
DAND
\\
csv
\\
enrollments.csv'
)
daily_engagement
=
read_csv
(
'F:
\\
data
\\
DAND
\\
csv
\\
daily_engagement.csv'
)
project_submissions
=
read_csv
(
'F:
\\
data
\\
DAND
\\
csv
\\
project_submissions.csv'
)
print
(
enrollments
[
0
])
print
(
daily_engagement
[
0
])
print
(
project_submissions
[
0
])
### For each of these three tables, find the number of rows in the table and
### the number of unique students in the table. To find the number of unique
### students, you might want to create a set of the account keys in each table.
def
account_num
(
files
):
num
=
set
()
for
file
in
files
:
num
.
add
(
file
[
'account_key'
])
return
len
(
num
)
enrollment_num_rows
=
len
(
enrollments
)
# Replace this with your code
enrollment_num_unique_students
=
set
()
# Replace this with your code
for
enrollment
in
enrollments
:
enrollment_num_unique_students
.
add
(
enrollment
[
'account_key'
])
len
(
enrollment_num_unique_students
)
engagement_num_rows
=
0
# Replace this with your code
engagement_num_unique_students
=
0
# Replace this with your code
submission_num_rows
=
0
# Replace this with your code
submission_num_unique_students
=
0
# Replace this with your code
Back
|
FazBrowse Home
|
New Git URL