39 lines
921 B
Plaintext
39 lines
921 B
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"import pickle\n",
|
|
"# read pickle files and check len and print first record and first record keys\n",
|
|
"\n",
|
|
"\n",
|
|
"categories = {\n",
|
|
"'SB': [426177001],\n",
|
|
"'AFIB': [164889003, 164890007],\n",
|
|
"'GSVT': [426761007, 713422000, 233896004, 233897008, 713422000],\n",
|
|
"'SR': [426783006, 427393009]\n",
|
|
"}\n",
|
|
"\n",
|
|
"\n",
|
|
"data = {}\n",
|
|
"for cat_name in categories.keys():\n",
|
|
" print(f\"Reading {cat_name}\")\n",
|
|
" with open(f'{cat_name}.pkl', 'rb') as f:\n",
|
|
" records = pickle.load(f)\n",
|
|
" data[cat_name] = records\n",
|
|
" print(f\"Length of {cat_name}: {len(records)}\")"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"language_info": {
|
|
"name": "python"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|