Python 3.x 如何使用google2pandas从Google Analytics获取超过10000行数据

Python 3.x 如何使用google2pandas从Google Analytics获取超过10000行数据,python-3.x,google-analytics,Python 3.x,Google Analytics,试图了解我如何使用Google2Pandas从Google Analytics获取超过1万行数据。我有这个: from google2pandas import * conn = GoogleAnalyticsQuery(secrets='./ga-creds/client_secrets.json', token_file_name='./ga-creds/analytics.dat') query = {\ 'ids' : '56611942', 'metrics' : 'pagevie

试图了解我如何使用Google2Pandas从Google Analytics获取超过1万行数据。我有这个:

from google2pandas import *

conn = GoogleAnalyticsQuery(secrets='./ga-creds/client_secrets.json', token_file_name='./ga-creds/analytics.dat')

query = {\
'ids' : '56611942',
'metrics' : 'pageviews',
'dimensions' : ['date', 'pagePath','browser','city','country'],
'start_date' : '2013-01-01',
'end_date':'2017-10-01',
'max_results' : 10
}

df, metadata = conn.execute_query(**query)
print(df)
在这里:

我使用这个解决方案,效果很好。另外,如果您想要一个更好的实现,我可以向您发送我今天使用的基于线程和其他东西的代码,这些代码可以让您利用API