can read otp

This commit is contained in:
2022-02-21 15:26:50 +01:00
parent 921457b934
commit 4877fdcdde
5 changed files with 90 additions and 83 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ from pojo.contact_pojo import ContactPojo
class ExcelReader:
# read the contact list from the exel file
def read_file(self) -> list:
def read_contacts(self) -> list:
contact_list_in_json = pandas.read_excel(r'./contact.xlsx').to_json(orient='records')
contact_dict_list = json.loads(contact_list_in_json)
contact_list = []
@@ -19,12 +19,12 @@ class ExcelReader:
last_name=last_name,
first_name=first_name,
ccid=contact_dict['ccid'],
passport_number=contact_dict['passport'])
passport_number=contact_dict['passport'], mail=contact_dict['email'])
contact_list.append(contact)
return contact_list
if __name__ == '__main__':
reader = ExcelReader()
data = reader.read_file()
data = reader.read_contacts()
print(data)