{ "cells": [ { "cell_type": "code", "execution_count": 9, "id": "566afa18", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import gc\n", "gc.collect()" ] }, { "cell_type": "code", "execution_count": 93, "id": "52d4f4de", "metadata": {}, "outputs": [], "source": [ "import warnings\n", "warnings.filterwarnings('ignore')" ] }, { "cell_type": "code", "execution_count": 12, "id": "f6a787f6", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "abd16a3416924e40af56ce286f68f8a6", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/6981 [00:00\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
FileNameKeyNameGround_truthXELP_Output
0BSC134A9O003_000_HCFA.tiff1A_PriInsIDNumberR6J588215755R6J588215755
1BSC134A9O003_000_HCFA.tiff2_PatFullNameSUMANTRI, TEGUHSUMANTRI, TEGUH
2BSC134A9O003_000_HCFA.tiff3_PatDOB1015197310151973
3BSC134A9O003_000_HCFA.tiff5_PatAddr114360 VOSE ST APT21914360 VOSE ST APT219
4BSC134A9O003_000_HCFA.tiff5_PatCityVAN NUYSVAN NUYS
...............
1270014PHP8843RO035_000_HCFA.tiff24_AnesEndTime[BLANK][BLANK]
1270015PHP8843RO035_000_HCFA.tiff24_AnesTotalTime[BLANK][BLANK]
1270016PHP8843RO035_000_HCFA.tiff24_AnesTotalMin[BLANK][BLANK]
1270017PHP8843RO035_000_HCFA.tiff24_AnesMod[BLANK][BLANK]
1270018PHP8843RO035_000_HCFA.tiff24_AnesUnits[BLANK][BLANK]
\n", "

1270019 rows × 4 columns

\n", "" ], "text/plain": [ " FileName KeyName Ground_truth \\\n", "0 BSC134A9O003_000_HCFA.tiff 1A_PriInsIDNumber R6J588215755 \n", "1 BSC134A9O003_000_HCFA.tiff 2_PatFullName SUMANTRI, TEGUH \n", "2 BSC134A9O003_000_HCFA.tiff 3_PatDOB 10151973 \n", "3 BSC134A9O003_000_HCFA.tiff 5_PatAddr1 14360 VOSE ST APT219 \n", "4 BSC134A9O003_000_HCFA.tiff 5_PatCity VAN NUYS \n", "... ... ... ... \n", "1270014 PHP8843RO035_000_HCFA.tiff 24_AnesEndTime [BLANK] \n", "1270015 PHP8843RO035_000_HCFA.tiff 24_AnesTotalTime [BLANK] \n", "1270016 PHP8843RO035_000_HCFA.tiff 24_AnesTotalMin [BLANK] \n", "1270017 PHP8843RO035_000_HCFA.tiff 24_AnesMod [BLANK] \n", "1270018 PHP8843RO035_000_HCFA.tiff 24_AnesUnits [BLANK] \n", "\n", " XELP_Output \n", "0 R6J588215755 \n", "1 SUMANTRI, TEGUH \n", "2 10151973 \n", "3 14360 VOSE ST APT219 \n", "4 VAN NUYS \n", "... ... \n", "1270014 [BLANK] \n", "1270015 [BLANK] \n", "1270016 [BLANK] \n", "1270017 [BLANK] \n", "1270018 [BLANK] \n", "\n", "[1270019 rows x 4 columns]" ] }, "execution_count": 186, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "from tqdm import tqdm\n", "\n", "# Initialize an empty DataFrame to store the merged results\n", "Merged_data_frame_all_images = pd.DataFrame()\n", "gc.collect()\n", "# Iterate over each group of images in the master DataFrame\n", "for img_name, grp_b_im in tqdm(master_df.groupby('FileName')):\n", " # Handle duplicates in the master DataFrame\n", " counts_master = grp_b_im['KeyName'].value_counts()\n", " mask_master = grp_b_im['KeyName'].map(counts_master) > 1\n", " grp_b_im.loc[mask_master, 'KeyName'] = grp_b_im['KeyName'] + (grp_b_im.groupby('KeyName').cumcount() + 1).astype(str)\n", " \n", " # Filter and handle duplicates in the extraction DataFrame\n", " extraction_for_img = Extraction_data[Extraction_data[\"FileName\"] == img_name]\n", " counts_extraction = extraction_for_img['KeyName'].value_counts()\n", " mask_extraction = extraction_for_img['KeyName'].map(counts_extraction) > 1\n", " extraction_for_img.loc[mask_extraction, 'KeyName'] = extraction_for_img['KeyName'] + (extraction_for_img.groupby('KeyName').cumcount() + 1).astype(str)\n", " \n", " # Merge the processed groups\n", " each_image_merged = pd.merge(grp_b_im, extraction_for_img, on=['FileName','KeyName'], how='outer')\n", " \n", " # Concatenate the merged data to the final DataFrame\n", " Merged_data_frame_all_images = pd.concat([Merged_data_frame_all_images, each_image_merged], ignore_index=True)\n", "\n", "# Display the final merged DataFrame\n", "Merged_data_frame_all_images.fillna('[BLANK]', inplace=True)\n", "Merged_data_frame_all_images[\"XELP_Output\"] = Merged_data_frame_all_images[\"XELP_Output\"].str.replace(\"\", \"1\", regex=False)" ] }, { "cell_type": "code", "execution_count": 187, "id": "9ce59f06", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1270019, 4)" ] }, "execution_count": 187, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Merged_data_frame_all_images.shape" ] }, { "cell_type": "code", "execution_count": 188, "id": "24f698b9", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
FileNameKeyNameGround_truthXELP_Output
0BSC134A9O003_000_HCFA.tiff1A_PriInsIDNumberR6J588215755R6J588215755
1BSC134A9O003_000_HCFA.tiff2_PatFullNameSUMANTRI, TEGUHSUMANTRI, TEGUH
2BSC134A9O003_000_HCFA.tiff3_PatDOB1015197310151973
3BSC134A9O003_000_HCFA.tiff5_PatAddr114360 VOSE ST APT21914360 VOSE ST APT219
4BSC134A9O003_000_HCFA.tiff5_PatCityVAN NUYSVAN NUYS
...............
1270014PHP8843RO035_000_HCFA.tiff24_AnesEndTime[BLANK][BLANK]
1270015PHP8843RO035_000_HCFA.tiff24_AnesTotalTime[BLANK][BLANK]
1270016PHP8843RO035_000_HCFA.tiff24_AnesTotalMin[BLANK][BLANK]
1270017PHP8843RO035_000_HCFA.tiff24_AnesMod[BLANK][BLANK]
1270018PHP8843RO035_000_HCFA.tiff24_AnesUnits[BLANK][BLANK]
\n", "

1270019 rows × 4 columns

\n", "
" ], "text/plain": [ " FileName KeyName Ground_truth \\\n", "0 BSC134A9O003_000_HCFA.tiff 1A_PriInsIDNumber R6J588215755 \n", "1 BSC134A9O003_000_HCFA.tiff 2_PatFullName SUMANTRI, TEGUH \n", "2 BSC134A9O003_000_HCFA.tiff 3_PatDOB 10151973 \n", "3 BSC134A9O003_000_HCFA.tiff 5_PatAddr1 14360 VOSE ST APT219 \n", "4 BSC134A9O003_000_HCFA.tiff 5_PatCity VAN NUYS \n", "... ... ... ... \n", "1270014 PHP8843RO035_000_HCFA.tiff 24_AnesEndTime [BLANK] \n", "1270015 PHP8843RO035_000_HCFA.tiff 24_AnesTotalTime [BLANK] \n", "1270016 PHP8843RO035_000_HCFA.tiff 24_AnesTotalMin [BLANK] \n", "1270017 PHP8843RO035_000_HCFA.tiff 24_AnesMod [BLANK] \n", "1270018 PHP8843RO035_000_HCFA.tiff 24_AnesUnits [BLANK] \n", "\n", " XELP_Output \n", "0 R6J588215755 \n", "1 SUMANTRI, TEGUH \n", "2 10151973 \n", "3 14360 VOSE ST APT219 \n", "4 VAN NUYS \n", "... ... \n", "1270014 [BLANK] \n", "1270015 [BLANK] \n", "1270016 [BLANK] \n", "1270017 [BLANK] \n", "1270018 [BLANK] \n", "\n", "[1270019 rows x 4 columns]" ] }, "execution_count": 188, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Merged_data_frame_all_images.drop_duplicates()" ] }, { "cell_type": "code", "execution_count": 189, "id": "cea45868", "metadata": {}, "outputs": [], "source": [ "error_images = [\"BSC7N4NDO024_000_HCFA.tiff\", \"BSC3844JO030_000_HCFA.tiff\", \"BSC854FEO028_000_HCFA.tiff\", \"BSC85433O001_000_HCFA.tiff\", \"BSC7T6TRO002_000_HCFA.tiff\"]" ] }, { "cell_type": "code", "execution_count": 190, "id": "98b19b2a", "metadata": {}, "outputs": [], "source": [ "Merged_data_frame_all_images = Merged_data_frame_all_images[~Merged_data_frame_all_images['FileName'].isin(error_images)]" ] }, { "cell_type": "code", "execution_count": 191, "id": "a9bc6b7c", "metadata": {}, "outputs": [], "source": [ "def strip_whitespace(x):\n", " if isinstance(x, str): # Check if the value is a string\n", " return x.strip()\n", " return x" ] }, { "cell_type": "code", "execution_count": 192, "id": "c78a56ee", "metadata": {}, "outputs": [], "source": [ "Merged_data_frame_all_images = Merged_data_frame_all_images.applymap(strip_whitespace)" ] }, { "cell_type": "code", "execution_count": 204, "id": "d4293a83", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "100%|████████████████████████████████████████████████████████████████████| 1268992/1268992 [00:07<00:00, 167852.61it/s]\n" ] } ], "source": [ "tqdm.pandas()\n", "\n", "# Apply the lambda function with progress tracking to add the 'Matching' column\n", "Merged_data_frame_all_images['Matching'] = Merged_data_frame_all_images.progress_apply(\n", " lambda x: 1 if str(x['Ground_truth']).strip() == str(x['XELP_Output']).strip() else 0,\n", " axis=1\n", ")" ] }, { "cell_type": "code", "execution_count": 233, "id": "1b09aa92", "metadata": {}, "outputs": [], "source": [ "Merged_data_frame_all_images.to_parquet(\"HCFA_Validation_split_evaluation.parquet\", index=False)" ] }, { "cell_type": "code", "execution_count": 209, "id": "cc4fce57", "metadata": {}, "outputs": [], "source": [ "Merged_data_frame_all_images_wo_blank = Merged_data_frame_all_images[Merged_data_frame_all_images[\"XELP_Output\"] != '[BLANK]']" ] }, { "cell_type": "code", "execution_count": 212, "id": "1161ccfe", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
FileNameKeyNameGround_truthXELP_OutputMatching
0BSC134A9O003_000_HCFA.tiff1A_PriInsIDNumberR6J588215755R6J5882157551
1BSC134A9O003_000_HCFA.tiff2_PatFullNameSUMANTRI, TEGUHSUMANTRI, TEGUH1
2BSC134A9O003_000_HCFA.tiff3_PatDOB10151973101519731
3BSC134A9O003_000_HCFA.tiff5_PatAddr114360 VOSE ST APT21914360 VOSE ST APT2191
4BSC134A9O003_000_HCFA.tiff5_PatCityVAN NUYSVAN NUYS1
..................
1269996PHP8843RO035_000_HCFA.tiff10A_PatConditionEmpNXX1
1269998PHP8843RO035_000_HCFA.tiff10B_PatConditionAutoNXX1
1270000PHP8843RO035_000_HCFA.tiff10C_PatConditionOtherNXX1
1270010PHP8843RO035_000_HCFA.tiff25_BillProvEINXX1
1270011PHP8843RO035_000_HCFA.tiff27_AcceptAssignmentYXX1
\n", "

443019 rows × 5 columns

\n", "
" ], "text/plain": [ " FileName KeyName \\\n", "0 BSC134A9O003_000_HCFA.tiff 1A_PriInsIDNumber \n", "1 BSC134A9O003_000_HCFA.tiff 2_PatFullName \n", "2 BSC134A9O003_000_HCFA.tiff 3_PatDOB \n", "3 BSC134A9O003_000_HCFA.tiff 5_PatAddr1 \n", "4 BSC134A9O003_000_HCFA.tiff 5_PatCity \n", "... ... ... \n", "1269996 PHP8843RO035_000_HCFA.tiff 10A_PatConditionEmpN \n", "1269998 PHP8843RO035_000_HCFA.tiff 10B_PatConditionAutoN \n", "1270000 PHP8843RO035_000_HCFA.tiff 10C_PatConditionOtherN \n", "1270010 PHP8843RO035_000_HCFA.tiff 25_BillProvEIN \n", "1270011 PHP8843RO035_000_HCFA.tiff 27_AcceptAssignmentY \n", "\n", " Ground_truth XELP_Output Matching \n", "0 R6J588215755 R6J588215755 1 \n", "1 SUMANTRI, TEGUH SUMANTRI, TEGUH 1 \n", "2 10151973 10151973 1 \n", "3 14360 VOSE ST APT219 14360 VOSE ST APT219 1 \n", "4 VAN NUYS VAN NUYS 1 \n", "... ... ... ... \n", "1269996 X X 1 \n", "1269998 X X 1 \n", "1270000 X X 1 \n", "1270010 X X 1 \n", "1270011 X X 1 \n", "\n", "[443019 rows x 5 columns]" ] }, "execution_count": 212, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Merged_data_frame_all_images_wo_blank" ] }, { "cell_type": "code", "execution_count": 210, "id": "dc18dcc2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Matching\n", "1 0.975811\n", "0 0.024189\n", "Name: proportion, dtype: float64" ] }, "execution_count": 210, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Merged_data_frame_all_images_wo_blank['Matching'].value_counts(normalize=True)" ] }, { "cell_type": "code", "execution_count": 216, "id": "cd718a27", "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/plain": [ "KeyName\n", "33_BillProvState 6940\n", "5_PatState 6927\n", "3_PatDOB 6875\n", "25_BillProvFedIdCode 6871\n", "33_BillProvCity 6863\n", " ... \n", "24_NDCUnitsQual6 7\n", "24_NDC5 6\n", "10A_PatConditionEmpY 6\n", "24_NDC6 3\n", "24_AnesStartTime2 1\n", "Name: count, Length: 202, dtype: int64" ] }, "execution_count": 216, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Merged_data_frame_all_images_wo_blank[Merged_data_frame_all_images_wo_blank['Matching'] == 1]['KeyName'].value_counts()" ] }, { "cell_type": "code", "execution_count": 226, "id": "f3c01d65", "metadata": {}, "outputs": [], "source": [ "Merged_data_frame_all_images[\"XELP_Output\"] = Merged_data_frame_all_images[\"XELP_Output\"].str.replace(\"\", \"1\", regex=False)" ] }, { "cell_type": "code", "execution_count": 230, "id": "8d1a785f", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
FileNameKeyNameGround_truthXELP_OutputMatching
\n", "
" ], "text/plain": [ "Empty DataFrame\n", "Columns: [FileName, KeyName, Ground_truth, XELP_Output, Matching]\n", "Index: []" ] }, "execution_count": 230, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\n", "Merged_data_frame_all_images[(Merged_data_frame_all_images['XELP_Output'] != '[BLANK]')&(Merged_data_frame_all_images['KeyName'] == '24_AnesStartTime') & (Merged_data_frame_all_images['Matching'] == 0)][:60]\n" ] }, { "cell_type": "code", "execution_count": 177, "id": "38573620", "metadata": {}, "outputs": [], "source": [ "blank_keys = [\"20_OSLabCharges\", \"11D_PriInsOtherPlanY\", \"19_LocalUse\", '17_RefProvOrgName',\n", " '30_BalanceDue',\n", " '24_NDCCharges',\n", " '24_NDCQualifier',\n", " '7_PriInsPhoneNumber','32_AmbToFacProvPostCodeExt',\n", " '20_OSLabY',\n", " '31_RenProvTaxonomyCode',\n", " '24C_EMG',\n", " '11D_PriInsOtherPlanN',\n", " '5_PatPhoneNumber',\n", " '20_OSLabN',\n", " '22_MedicaidCode',\n", " '29_AmountPaid',\n", " '33_BillProvPhone',\n", " '16_PatUTWToDate',\n", " '22_MedicaidRefNum',\n", " '24_AnesMod']" ] }, { "cell_type": "code", "execution_count": 182, "id": "5b951dd3", "metadata": {}, "outputs": [], "source": [ "dummy = Merged_data_frame_all_images[Merged_data_frame_all_images['KeyName'].isin(blank_keys)]" ] }, { "cell_type": "code", "execution_count": 183, "id": "7d244a8c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
FileNameKeyNameGround_truthXELP_OutputMatching
7BSC134A9O003_000_HCFA.tiff5_PatPhoneNumber[BLANK][BLANK]1
13BSC134A9O003_000_HCFA.tiff7_PriInsPhoneNumber[BLANK][BLANK]1
33BSC134A9O003_000_HCFA.tiff16_PatUTWToDate[BLANK][BLANK]1
38BSC134A9O003_000_HCFA.tiff17_RefProvOrgName[BLANK][BLANK]1
42BSC134A9O003_000_HCFA.tiff20_OSLabCharges[BLANK][BLANK]1
..................
1270004PHP8843RO035_000_HCFA.tiff11D_PriInsOtherPlanN[BLANK][BLANK]1
1270005PHP8843RO035_000_HCFA.tiff19_LocalUse[BLANK][BLANK]1
1270007PHP8843RO035_000_HCFA.tiff20_OSLabY[BLANK][BLANK]1
1270008PHP8843RO035_000_HCFA.tiff20_OSLabN[BLANK][BLANK]1
1270017PHP8843RO035_000_HCFA.tiff24_AnesMod[BLANK][BLANK]1
\n", "

136532 rows × 5 columns

\n", "
" ], "text/plain": [ " FileName KeyName Ground_truth \\\n", "7 BSC134A9O003_000_HCFA.tiff 5_PatPhoneNumber [BLANK] \n", "13 BSC134A9O003_000_HCFA.tiff 7_PriInsPhoneNumber [BLANK] \n", "33 BSC134A9O003_000_HCFA.tiff 16_PatUTWToDate [BLANK] \n", "38 BSC134A9O003_000_HCFA.tiff 17_RefProvOrgName [BLANK] \n", "42 BSC134A9O003_000_HCFA.tiff 20_OSLabCharges [BLANK] \n", "... ... ... ... \n", "1270004 PHP8843RO035_000_HCFA.tiff 11D_PriInsOtherPlanN [BLANK] \n", "1270005 PHP8843RO035_000_HCFA.tiff 19_LocalUse [BLANK] \n", "1270007 PHP8843RO035_000_HCFA.tiff 20_OSLabY [BLANK] \n", "1270008 PHP8843RO035_000_HCFA.tiff 20_OSLabN [BLANK] \n", "1270017 PHP8843RO035_000_HCFA.tiff 24_AnesMod [BLANK] \n", "\n", " XELP_Output Matching \n", "7 [BLANK] 1 \n", "13 [BLANK] 1 \n", "33 [BLANK] 1 \n", "38 [BLANK] 1 \n", "42 [BLANK] 1 \n", "... ... ... \n", "1270004 [BLANK] 1 \n", "1270005 [BLANK] 1 \n", "1270007 [BLANK] 1 \n", "1270008 [BLANK] 1 \n", "1270017 [BLANK] 1 \n", "\n", "[136532 rows x 5 columns]" ] }, "execution_count": 183, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dummy" ] }, { "cell_type": "code", "execution_count": 184, "id": "5bc30647", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "KeyName\n", "32_FacProvOrgName 1044\n", "31_PrnRenProvFullName 815\n", "26_PatAcctNo 612\n", "33_BillProvOrgName 608\n", "33_BillProvAddr1 544\n", "32_FacProvAddr1 520\n", "32_FacProvFullName 465\n", "31_RenDateSigned 359\n", "2_PatFullName 347\n", "4_PriInsFullName 327\n", "33_BillProvFullName 303\n", "1A_PriInsIDNumber 282\n", "13_PriSignonFileList 256\n", "32_FacProvPostCode 253\n", "33_BillProvPostCode 239\n", "17_RefProvFullName 214\n", "33_BillProvNPIId 206\n", "7_PriInsAddr1 180\n", "5_PatAddr1 177\n", "11_PriInsPolGrpNumber 167\n", "12_PatSignonFile 155\n", "9_SecInsFullName 143\n", "11C_PriInsPlanName 142\n", "28_TotalCharges 141\n", "32_FacProvCity 125\n", "32_FacProvNPIId 116\n", "21_DiagCode2 108\n", "33_BillProvCity 108\n", "25_BillProvEIN 108\n", "25_BillProvFedIdCode 104\n", "24J_RenProvNPIId 97\n", "21_DiagCode1 93\n", "33_BillProvOtherIdFull 91\n", "25_BillProvSSN 89\n", "5_PatCity 88\n", "23_PriorAuthNum 88\n", "3_PatDOB 87\n", "24J_RenProvNPIId1 83\n", "24J_RenProvNPIId2 82\n", "5_PatPostCode 81\n", "9A_SecInsPolGrpNumber 78\n", "17B_RefProvNPI 77\n", "7_PriInsPostCode 76\n", "7_PriInsCity 75\n", "24J_RenProvOtherId2 74\n", "11B_PriInsEmpName 74\n", "11A_PriInsDOB 71\n", "24A_FromDate2 68\n", "24F_LineCharges2 67\n", "24J_RenProvOtherId1 66\n", "24_NDC3 65\n", "24A_FromDate1 64\n", "21_DiagCode 63\n", "24_NDC2 59\n", "21_DiagCode4 59\n", "21_DiagCode3 57\n", "24E_DiagPtr1 57\n", "32_FacProvOtherIdFull 56\n", "24F_LineCharges1 56\n", "11B_OtherClaimIdCode 56\n", "Name: count, dtype: int64" ] }, "execution_count": 184, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Merged_data_frame_all_images[Merged_data_frame_all_images['Matching'] == 0]['KeyName'].value_counts()[:60]" ] }, { "cell_type": "code", "execution_count": null, "id": "89d033b0", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }