-1

I am trying to write a pandas data frame to a google sheet

# open google sheet where 'test' is the name of the project
sh = gc.open_all('test')

# update the first sheet with df, starting at cell B2 and second sheet with ds
wks = sh[:-1]
wks.set_dataframe(df, (1, 1))

every time I run this app I get this error:

wks.set_dataframe(df, (1, 1))
AttributeError: 'list' object has no attribute 'set_dataframe'

It seems as if set_dataframe is not being recognized within pygsheets

Has anyone encountered this error or know what is the problem?

1 Answers1

1

use gspread_dataframe

you can check it out from here gspread-dataframe

Yash Shah
  • 125
  • 13