英文:
Uploading a dataframe to BigQuery results in null values
问题
我有以下数据框架,我正在将其上传到BigQuery。上传后,在Bigquery中,除了sessions和date列以外的所有列最终都变成了null值,尽管在数据框架中没有null值。
为什么会这样?我已更改为正确的数据类型并指定了Bigquery的架构,但没有成功。
英文:
I have the following dataframe that I'm uploading to BigQuery. When uploaded, all columns except for sessions and date end up with null values in Bigquery despite having 0 null values in the dataframe.
Why would this be? I've changed to the correct datatypes and specified the schema to Bigquery to no avail.
答案1
得分: 4
问题在于如果API没有提供适当的反馈,列名中的任何空格都会导致所有数值上传到数据库时都变为null。
编辑:如果在列名中使用了一个“:”,在从Google Analytics获取自定义事件时也会发生这种情况。
英文:
The problem was that WITHOUT the api giving appropriate feedback any spaces in the column names result in the values all being uploaded as null to the database.
EDIT: this also occurs if using a ":" in the column name that can be found when pulling custom events from google analytics
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论