I am using datacompy to compare data in 2 excel files. I would like to send the output to an excel file (possibly an email too but that's not the priority ). How can I do that ?
I have tried storing the value of compare.report and passing that to the excel though it doesn't work
compare = datacompy.Compare(df1,df2,join_columns=['COL_A','COL_B']) compare_rep = compare.report()
with pd.ExcelWriter('Comparison_report.xlsx') as writer: compare_rep.to_excel(writer,sheet_name = 'DM',index=False)