Created
October 24, 2024 16:46
-
-
Save iluvcapra/561271be2feaa3a80b71975d5bac352b to your computer and use it in GitHub Desktop.
UCS Excel to JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
ucs_ss = pd.read_excel('UCS v8.2.1 Full List.xlsx') | |
with open('ucs_81.json','w') as fp: | |
json.dump([{'cat_id': row[3], 'defn': row[5], 'syns': str(row[6]).split(", "), 'vers': '8.2.1'} for row in ucs_ss.itertuples()][2:], fp, indent=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment