I am using the library pandas-gbq.to_gbq to create my tables on Google Big Query. Everything is working fine, except for the fact that I wasn't able to add the table description using this function (not column description). I've tried:
schema = {
"description": "Description here",
"fields": [
{
"name": "nome",
"type": "STRING",
"description": "Blablabla"
},
{
"name": "numero",
"type": "INT64",
"description": "Blablabla"
}
]
}
df = pd.DataFrame({"nome": ["Monique", "Rodrigo"],
"numero": [1, 2]})
df.to_gbq(table, project_id=project_id,if_exists="replace", table_schema = schema)
But I got the error:
TypeError: string indices must be integers
Is it possible to add the description using this function? Thanks!