df1:
Name Company Desgn Date Salary
Rick JKA HR 2020-07-21 52
Nick lka Engg 2020-07-21 65
John SDK HR 2020-07-21 75
df2:
Name Company Desgn
Rick JKA HR
Nick lka Engg
John SDK HR
Hi i need to write the df1 and df2 into a biq query table, basically appending both dataframe in a table using google cloud function. I am able to write df1 but it is giving error for df2.
code:
lst = [df1,df2]
for i in lst:
i.to_gbq('dataset.table',project_id="project_id",if_exists='append')
error: "Please verify that the structure and data types in the DataFrame match the schema of the destination table."
You could have the same df structure and schema but use null values for date and salary
You could also append df1 with df2 df1: