Official Python client for Google BigQuery. Current version: 3.40.1 (Mar 2026). v3.0 made google-cloud-bigquery-storage and pyarrow required dependencies. Authentication uses Application Default Credentials (ADC) — no explicit API key. query() returns a QueryJob — must call .result() to wait for completion. to_dataframe() dtype behavior changed in v3 (nullable pandas dtypes). Python 3.9+ required as of v3.x.
pip install google-cloud-bigqueryVerified import paths — ran on the pinned version, not inferred.
BigQuery Python client — query and to_dataframe with ADC auth.
pip install 'google-cloud-bigquery[pandas]' — installs all required deps including db-dtypes.
Use pandas nullable dtypes in comparisons: df['col'].dtype == 'Int64' not 'int64'. Or use pd.api.types.is_integer_dtype().
rows = client.query(sql).result() — the .result() call is mandatory.
Local: gcloud auth application-default login. Production: set GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json or use Workload Identity.
SELECT * FROM `myproject.mydataset.mytable` — backticks required for fully qualified table names.
from google.cloud.bigquery import StandardSqlDataType — not from google.cloud.bigquery_v2
Use Python 3.9+