我有一个 python 脚本,我在其中使用输入文件,这些文件是 pickle 文件或 excel 文件。然后将输出文件保存在驱动器中。我需要将 py 转换为 exe 文件。作为一只新蜜蜂,我无法理解如何创建 exe 文件以及如何处理这些情况。
我提到的部分代码是我使用 excel 文件作为输入和输出的地方。
请注意,我还没有将它创建为项目。
customer_data = pd.read_excel("C:/Users/sonia/Downloads/book1.xlsx", sheetname = "Sheet1", heading = 0)
customer_data.set_index("Chassis no ", inplace = True)
data_in_form_reqd = pd.read_excel("C:/Users/sonia/Downloads/Accidental case.xlsx",sheetname = ["Customer_Info", "Insurance_Info"], heading = 0)
data_in_insurance_form_reqd = data_in_form_reqd["Insurance_Info"]
data_in_insurance_form_reqd.set_index("Short Name", inplace = True)
data_in_form_reqd = data_in_form_reqd["Customer_Info"]
data_in_form_reqd["Entry Name"] = data_in_form_reqd["Short Name"] + "_1"
data_in_form_reqd.set_index("Short Name", inplace = True)
............................. c_i_data_exisiting = pd.read_excel("C:/Users/sonia/Downloads/Accidental case. xlsx", sheetname = "Sheet4", 标题 = 0)
c_i_data_exisiting = c_i_data_exisiting.append(c_i_data)
c_i_data_exisiting = c_i_data_exisiting[['servicing_dt', 'V_No', 'M_No', 'YoP', 'Cust_N', 'Cust_E' , 'Cust_Mo' , 'Cust_Wh', 'yesno' , 'i_name', 'i_pol_no', 'i_mail', 'Doc_Sub_dt' , 'exp_est_date' , 'est_cost' , 'act_ext_dt' , 'parts_avail' , 'mail_send_dt_to_i_comp', 'mail_response_dt_from_i_comp', 's_name' , 's_mobile', 's_mail', 's_whatsapp', 'call_dt_to_surveyor', 'est_dt_of_survey', 'act_dt_of_survey', 'survey_agreement', 'act_dt_all_party_agreement' , 'st_dt_repair', 'surveyor_follow_up', 'act_dt_all_party_agreement_follow_up', 'est_dt_to_complete_repair', 'act_dt_of_completion' , 'final_dt_of_survey' , 'dt_of_collecting_bike', 'feedback' , 'status' ,'impt', 'Sr_Mgr', 'St_Mgr' , 'Ins_Lead' ,'Mechanic' , 'comment']]
c_i_data_exisiting.to_csv("C:/Users/sonia/Downloads/axlsx.csv", index = False)