db-dtypes
Pandas Data Types for SQL systems (BigQuery, Spanner)
Decision gist · record as of 2026-08-14
Yes. db-dtypes is actively maintained, production-stable, has no security vulnerabilities, and solves a real problem for anyone moving data between pandas and SQL systems like BigQuery or Spanner. Low install friction and permissive licensing make it a straightforward addition to data pipelines. Install it if you regularly work with SQL data in pandas and need type fidelity.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.10; Python 3.9 and earlier are not supported.
- Low install friction with a pure-wheel distribution.
- Actively maintained as of 2026-08-14 with recent releases; requires Python >= 3.10.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
last release 2026-07-08 (37 days) · last repo commit 2026-08-14 · 5,371 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 47,028,806 downloads/mo, #605 on PyPI
Alternatives
Verify before relying
pip install db-dtypes
import db_dtypes
import pandas as pd
# Use db-dtypes extension types in pandas DataFrames
df = pd.DataFrame({'col': pd.array([], dtype=db_dtypes.DateType())})- Whether db-dtypes covers all BigQuery and Spanner data types or a subset
- Performance characteristics when working with large datasets from SQL systems
- Compatibility with specific versions of BigQuery or Spanner client libraries
What it is and what it does
db-dtypes extends pandas with custom data types designed to represent types from SQL databases like BigQuery and Spanner. It implements pandas extension data types, allowing you to work with database-native types directly in pandas DataFrames without lossy conversion to standard Python/NumPy types. This is particularly useful when round-tripping data between pandas and SQL systems, as it preserves type semantics and avoids unnecessary casting.
The package depends on numpy, pandas, pyarrow, and packaging, integrating seamlessly into the pandas ecosystem. It is actively maintained, classified as Production/Stable, and has no known security vulnerabilities. Installation is straightforward via pip, with low friction due to its pure-Python wheel distribution.
Use it for
- Load BigQuery query results into pandas while preserving SQL type information for accurate downstream analysis.
- Convert pandas DataFrames back to BigQuery with correct type mapping, avoiding schema inference errors.
- Work with Spanner data in pandas while maintaining database-native type semantics.
- Build ETL pipelines that move data between SQL systems and pandas without type degradation.
- Develop data science workflows that require precise type handling for SQL-sourced datasets.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
db-dtypes is actively maintained, production-stable, has no security vulnerabilities, and solves a real problem for anyone moving data between pandas and SQL systems like BigQuery or Spanner. Low install friction and permissive licensing make it a straightforward addition to data pipelines. Install it if you regularly work with SQL data in pandas and need type fidelity.
Install
db-dtypes on PyPI
Before you install
Low install friction with a pure-wheel distribution. Actively maintained as of 2026-08-14 with recent releases; requires Python >= 3.10.
Requires Python >= 3.10; Python 3.9 and earlier are not supported.
License in practice
Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install db-dtypes
import db_dtypes
import pandas as pd
# Use db-dtypes extension types in pandas DataFrames
df = pd.DataFrame({'col': pd.array([], dtype=db_dtypes.DateType())})
Verify before relying
- Whether db-dtypes covers all BigQuery and Spanner data types or a subset
- Performance characteristics when working with large datasets from SQL systems
- Compatibility with specific versions of BigQuery or Spanner client libraries
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesnumpypackagingpandaspyarrow |
| Maintenance | Actively maintained 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 47,028,806 / month, #605 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Database :: Front-Ends |
Evidence: db_dtypes-1.7.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pandas extension types sql”
- db-dtypesProvides pandas extension data types for SQL systems like BigQuery…
- singlestoredbProvides a DB-API 2.0 compatible Python interface to SingleStore, a…
- pangresUpserts pandas DataFrames into PostgreSQL, MySQL, and SQLite…
Give your agent the search over MCP, or paste the wish link into any chat.
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.
Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.
A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.
A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.
Install it if you need to query Databricks clusters or SQL warehouses from Python.
Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.
Install it if you need to connect Python to PostgreSQL.
See also pybigquery · pandas-gbq · sqlalchemy-spanner · bigframes · bcpandas · sqlalchemy-bigquery · pangres · qpd · presto-types-parser · pytd