Created
November 11, 2020 23:06
-
-
Save hamletbatista/f07869144ffe52085143bb26f3e62c7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#let's build a pandas dataframe with the search console data | |
import pandas as pd | |
def get_search_console_data(webproperty, days=-365): | |
if webproperty is not None: | |
query = webproperty.query.range(start='today', days=days).dimension('date', 'query') | |
r = query.get() | |
df = pd.DataFrame(r.rows) | |
return df | |
print("Web property doesn't exist, please select a valid one from this list") | |
print(account.webproperties) | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment