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中,几周前这项操作还正常运行,但现在只返回了10万行。有没有可靠的方法可以解决这个问题?