Skip to content

Commit

Permalink
fix whitespace in unii display_name
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanWelzel committed May 29, 2024
1 parent 19ed808 commit 858e4fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hub/dataload/sources/unii/unii_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ def load_data(input_file):
record['unii']['ncit_description'] = ncit_descriptions[ncit_id]
if isinstance(record['unii'], dict):
del record['unii']['_id']
if 'display name' in record['unii']:
record['unii']['display_name'] = record['unii'].pop(
'display name')
else:
for subr in record['unii']:
del subr['_id']
if 'display name' in subr:
subr['display_name'] = subr.pop('display name')

# convert fields to integer
record = int_convert(record, include_keys=['unii.pubchem'])
Expand Down

0 comments on commit 858e4fa

Please sign in to comment.