'Update gspread from the last row in the spreadsheet
I want to update a worksheet in google by using the following code:
gc = gspread.service_account(filename='gspread_keys.json')
#open the gspread sheet
sh = gc.open("data_horas")
#use the worksheet
worksheet = sh.worksheet(title="cum_data")
#get values from the existing worksheet and calculate the last row by the length of the rows.
w=worksheet.get_all_values()
w1=len(w)+1
worksheet.update(w1,[df_2.columns.values.tolist()])
The idea is to update the worksheet from the last row+1.
Question:
Could you please suggest how to update the Dataframe in the google worksheet starting from the last row and avoiding the header of that Dataframe?
Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
