2017-10-04 46 views
1

试图了解如何使用Google2Pandas从Google Analytics获取超过10K行。我有这样的:如何使用Google2pandas从Google Analytics获取超过10,000行

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) 

回答

相关问题