From 474c9bf3391a51a6309df17b0d71f02fb7f043cb Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Thu, 18 Sep 2025 15:36:09 +0200 Subject: [PATCH] specify type of passport_id --- excel_reader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/excel_reader.py b/excel_reader.py index ad75e5b..dbc19f7 100755 --- a/excel_reader.py +++ b/excel_reader.py @@ -12,7 +12,7 @@ chinnese_number_prefix = ['13', '15', '18'] def read_contacts(file_name) -> list: print("read file " + file_name) - contact_list_in_json = pandas.read_excel(file_name).to_json(orient='records') + contact_list_in_json = pandas.read_excel(file_name, dtype={'passport': str}).to_json(orient='records') contact_dict_list = json.loads(contact_list_in_json) contact_list = [] for contact_dict in contact_dict_list: