import pandas as pd from google.oauth2 import service_account import pandas_gbq import logging logger = logging.getLogger("pandas_gbq") logger.setLevel(logging.DEBUG) logger.addHandler(logging.StreamHandler()) project_id = "analytics-dev-308300" credentials = service_account.Credentials.from_service_account_file( "../keys/gcp_key.json", ) pd.read_gbq(query=query, credentials=credentials, project_id=project_id)