I am reading a row from an excel file and trying to write it back to excel as row but it writes as column, I am using pandas
import pandas as pd
import xlsxwriter as xlsw
cols = [1, 2, 3, 4, 5, 6, 7]
df = pd.read_excel('test.xlsx', sheet_names='Sheet1', usecols=cols)
df.head()
dfr = df.iloc[6]
dfr = pd.DataFrame(dfr,columns=['Voltage', 'Amps', 'Expected
Voltage','Expected Current', 'ExpectedLogicalValue', 'Actual Voltage'])
writer = pd.ExcelWriter('Output.xlsx', engine='xlsxwriter')
dfr.to_excel(writer, sheet_name="data", index=False)
writer.save()