I'm trying to upload a DataFrame to Google Sheets using the df2gspread library. The upload is successful, however, it also uploads the index of my DataFrame. Is there anyway to not have the index of my dataframe be included in the upload?
My code:
spreadsheet_key = '1Rg1AUhwz771Rt8LYNtmdgTfeXZdYVNT5o8sW3nlkUQg'
wks_name = 'Master'
d2g.upload(df_result, spreadsheet_key, wks_name, row_names=True)
My Spreadsheet:
Thank you to @Chris for your comment. I needed to set row_names to False.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.