1

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:

https://gyazo.com/492838f2c5f8d8b05df3365e5f206186

1
  • 1
    did you try row_names=False Commented Jul 3, 2020 at 18:14

1 Answer 1

2

Thank you to @Chris for your comment. I needed to set row_names to False.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.