2017-10-04 45 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) 

回答

相關問題