# 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)
Asked
Active
Viewed 80 times
-1
1 Answers
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
-
Thanks its working, actually i was using only row & column parameter – akhil kn Jun 09 '20 at 17:27
-
Happy to hear that it is working. If you found the answer helpful consider accepting the answer by clicking on the tick on the side of the answer. – Sherin Jayanand Jun 09 '20 at 17:31