I want to store some website data that I collected in Excel. The procedure is running smoothly, however the issue is that it repeatedly overwrites the fresh data in the first row. I added the data to the excel file using the following code:
Claim_Level.append((head(PDF_FormatType, AR_Configuration_Name, p_dob, Client_Id, p_payor, Provider_Address, p_taxid, p_bpnpi, p_renp, Insurance_Address, CHECK_EFT_Address, CHECK_EFT_Number, p_name, INSURED_NAME, PATIENT_CORRECTED_NAME, Account_Number, Sr_No, p_dos, p_dsub, p_ins, INSURED_CORRECTED_ID, p_ctype, Billed_Amount, Paid_Amount, Total_Contractual_Amount, Deductible_Amount, Coninsurance_Amount, Co_Pay_Amount, Adjustment_Amount, Claim_Status_No, p_cnum, Plan_Name, Claim_Paid_Date, CROSS_OVER_PAYER_NAME, Non_Covered_Amount, Covered_Amount, DRG_Number, DRG_Amount, Total_Allowed_Amount, Medical_Record_Number, Interest, Sequestration_Amount, Total_Patient_Responsibility, Late_Filing_Charge, Payee_ID, Patient_Group_Policy_No, Check_EFT_Date, Previously_Paid, Forwarded_to_Additional_Payer, PATIENT_RESPONSIBILITY_REASON_CODE, ASG, Processed_As, Expected_Reimbursement, p_renp, p_rpnpi, Claim_Status, Inboxes_Name, Category, Queue, Inbox_Description, Unknown_Inbox_Category, OCR_Processed_Date, time, i, xnum)))
csvgenerater = pd.DataFrame(Claim_Level)
with pd.ExcelWriter('OUTPUT_FILE.xlsx', mode=mode) as writer:
.....csvgenerater.to_excel(writer, sheet_name = 'ClaimLevel_Output', index=False)
The screenshot of the code:
I want it to store the data row by row and not overwrite it.