This is the typical connection I have from my local device:
from google.cloud import bigquery
from google.oauth2 import service_account
credentials_path = "credential path"
credentials = service_account.Credentials.from_service_account_file(credentials_path)
project_id = "project id"
client = bigquery.Client(credentials=credentials, project=project_id)
sql_query ="SELECT * FROM table"
query_job = client.query(sql_query)
results = query_job.result()
Until there everything runs nice, but here:
df = results.to_dataframe()
I get this error:
And I haven't been able to solve it. I have found some questions (1,2) that are pretty similar but don't have an accepted answer. In my problem, I have that package installed, so it seems that google cloud is not able to import that package? Any suggestions?