from google.cloud import bigquery as bq
import google_auth_oauthlib.flow
query = '''select ... from ...'''
bigquery_client = bq.Client()
table = bq.query.QueryResults(query=query,client=bigquery_client)
table.use_legacy_sql = False
table.run()
# transfer bigquery data to pandas dataframe
columns=[field.name for field in table.schema]
rows = table.fetch_data()
data = []
for row in rows:
data.append(row)
df = pd.DataFrame(data=data[0],columns=columns)
我想将超过 1000 万行加载到 python 中,几周前它运行良好,但现在它只返回 100,000 行。任何人都知道这样做的可靠方法吗?