【发布时间】:2021-03-24 07:39:14
【问题描述】:
我尝试在终端和 juypter lab 中安装它,它说它已成功安装,但是当我运行 df = query_job.to_dataframe() 时,我不断收到错误“ ValueError: The pyarrow library is not installed, please install pyarrow to use the to_arrow() function."。我不知道如何解决这个问题。有什么建议吗?我正在尝试使用代码最终从谷歌数据工作室访问数据,
from google.cloud import bigquery
import pandas
import numpy
import pyarrow
bigquery_client = bigquery.Client()
import os
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] ='full file path here.json'
QUERY = """
SELECT *
FROM `warehouse`
LIMIT 100
"""
query_job = bigquery_client.query(QUERY)
df = query_job.to_dataframe()
【问题讨论】:
-
您好,可以分享一下您的 requirements.txt 吗?
-
您是否尝试将所有软件包更新到最新版本?
-
我也有这个问题。
标签: google-bigquery jupyter pyarrow