Fail to Append Data in Existing excel with specific Column using python pandas. How to write clear code to append the results of dataframe in specific column in existing excel?
Code:
import xlsxwriter
wb = xlsxwriter.Workbook(r'G:\alpha.xlsx')
ws = wb.add_worksheet()
data=[df1]
ws.write_column('D2', data)
wb.close()
Existing Excel Alpha.xlsx
Col_A Col_B Col_C Col_D Col_E Col_F 1 10-10-2022 Amy Racing 2 05-10-2022 John Music 3 04-08-2022 Adam Travel 4 07-06-2022 Jenny Games
Existing Excel Beta.xlsx
Col_A Col_B Col_C 1 132150 Section A 2 546546 Section B 3 556446 Section C 4 123215 Section D
Part 1: Desired Result in Existing Excel Alpha.xlsx
Col_A Col_B Col_C Col_D Col_E Col_F 1 10-10-2022 Amy 132150 Racing 2 05-10-2022 John 546546 Music 3 04-08-2022 Adam 556446 Travel 4 07-06-2022 Jenny 123215 Games