0

Trying to run a query then past the results in excel but I always get one extra column with the row numbers, not sure how to get rid of that

this is what I have so far

#connect to AWS con = psycopg2.connect("insert login info here")

df = pd.read_sql_query("insert query here",con)

df.reset_index(drop=True, inplace=True) df.to_excel(r"C:\Desktop\Test File.xlsx",sheet_name='PrevAccounts')

print('done')

0 Answers0