python-3.x - 具有大结果的 Pandas read_gbq
问题描述
我正在尝试从 Google bigquery 公共数据集中获取数据并将结果存储在 pandas 数据框中。当我添加 LIMIT 100 之类的内容时,我的代码运行良好,但是当我尝试在没有它的情况下运行时出现错误。理想情况下,我想从公共数据集中检索所有行,将它们存储在 pandas 数据框中,并在 Python 中使用它,而不是在谷歌云或 SQL 中使用。这是我当前的代码和错误消息。
import pandas as pd
process_date = '2021-08-16'
process_date_no_dash = '20210816'
project_id = 'myproject-323109'
query = '''
SELECT *
FROM `bigquery-public-data.crypto_bitcoin.transactions`
'''
df_bit = pd.read_gbq(query, project_id = project_id, dialect = 'standard', configuration={"allow_large_results":True})
GenericGBQException: Reason: 403 Response too large to return. Consider specifying a destination table in your job configuration. For more details, see https://cloud.google.com/bigquery/troubleshooting-errors
如何修复此错误?
解决方案
推荐阅读
- javascript - 返回上一条指令js
- c# - razor page core: bind dynamic checkbox list to model
- swift - 如何获取与另一点距离最小的线上的点的坐标
- azure-devops - CICD YML 中的 azure devops 版本号
- firebase - 从 firestore 地图到 StreamBuilder => ListView.Builder
- python-3.x - tensorflow 查找张量中最后一次出现最大值的索引
- php - 将数字从高到低
- ios - flutter_launcher_icon 无法正常工作
- flutter - 初始化形式参数不能在工厂构造函数中使用
- java - 将 Enum 与 switch 语句一起使用:需要常量表达式错误