I am fetching a google sheet as pandas dataframe, then adding a column in the df and then uploading it back. I am facing this error:
Object of type 'int64' is not JSON serializable
Below is the code:
#reading and writing on google sheets
gc = pygsheets.authorize(service_file="/Projects/big_query_funnel_v1/input/AppFunnelgs-e1968da.json")
sheet=gc.open('Daily Drop Offs Summary')
wks = sheet.worksheet_by_title('New_Funnel')
#converting to pandas df
ds = wks.get_as_df()
#making a new column
ds.insert(loc=1, column=str(dates), value=edf.vals)
print(ds.head())
wks.set_dataframe(ds, 'A1')
I am getting the error in the last line of code i.e while uploading back the df.