Skip to content

Commit 4196fb7

Browse files
committed
New subjects
1 parent b3d967c commit 4196fb7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

caltechdata_write/customize_schema.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ def customize_schema(json_record):
88
#Extract subjects to single string
99
if "subjects" in json_record:
1010
subjects = json_record['subjects']
11-
substr = ''
12-
#subs = []
11+
#substr = ''
12+
subs = []
1313
for s in subjects:
14-
#subs.append(s['subject'])
15-
if substr != '':
16-
substr = substr + ', '
17-
substr = substr+s['subject']
18-
json_record['subjects']=substr
14+
subs.append(s['subject'])
15+
#if substr != '':
16+
# substr = substr + ', '
17+
#substr = substr+s['subject']
18+
json_record['subjects']=subs#tr
1919
#print(substr)
2020
#del json_record['subjects']
2121

0 commit comments

Comments
 (0)