-1
# accessing workbook
wb = gc.open_by_url('https://docs.google.com/spreadsheets/d/1LcFa9PDSjaL-Po47okWzLaUC4QUdtRSXzrgslTo6V7E/edit#gid=0')

# creating new worksheet
worksheet = wb.add_worksheet(title="A_worksheet", rows="100", cols="20")

# print df in new worksheet
sh = wb.worksheet('A_worksheet')
set_with_dataframe(sh, df)
warped
  • 8,947
  • 3
  • 22
  • 49
akhil kn
  • 3
  • 4

1 Answers1

0

I just went through the source code for set_with_dataframe. You can pass row and col as a parameter, the default is 1 and hence where it writes. Try passing appropriate values and check.

def set_with_dataframe(worksheet,
                       dataframe,
                       row=1,
                       col=1,
                       include_index=False,
                       include_column_header=True,
                       resize=False,
                       allow_formulas=True):

Hope that helps.

Sherin Jayanand
  • 204
  • 2
  • 9