Im reading a csv file and filtering data from that file to input this date into a google sheet but everytime i try to input the data into a google sheets it gives me this error:
TypeError: Object of type time is not JSON serializable
So I have tried to convert all my time to a string using the code bellow Here is the result of running a dtype on the dataframe before I changed data to string.
Matrícula int64
Chave int64
Nome_Willer object
Supervisor_ object
Coordenador_ object
Data datetime64[ns]
Status_w object
Aderência float64
Extra object
Status object
Mês object
dtype: object
abs['Data'] = abs['Data'].dt.strftime('%Y%m%d%H%M%S')
here is after I changed it to string format
Matrícula int64
Chave int64
Nome_Willer object
Supervisor_ object
Coordenador_ object
Data object
Status_w object
Aderência float64
Extra object
Status object
Mês object
dtype: object
Iam using this code to input the data i have filtered in to googlesheets
def updating(x,y):
x.update([y.columns.values.tolist()]+ y.values.tolist())
I created a function that adds the data in to google sheets. X is the name of the sheet in the spreadsheet and y is the new dataframe with the filtered data.