pandasql
sqldf for pandas
Decision gist · record as of 2026-08-14
No. The package is abandoned (last release 2016, no commits since July 2024 in archived repo) and has high install friction. Modern alternatives like DuckDB or Polars provide SQL-on-DataFrames with active maintenance, better performance, and compatibility with current Python versions. Use pandasql only if you have legacy code already depending on it; do not start new projects with it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires pandas to be installed separately; no explicit Python version support declared.
- Abandoned package may have compatibility issues with modern Python and pandas versions.
- High install friction due to distribution format (egg and tarball only, no wheels).
License · maintenance · safety
(unclear) — MIT-like permissive license (copyright notice and permission text present) with no SPDX identifier recorded. Permissive for use but license treatment is marked unclear, so verify the exact terms before relying on it commercially.
last release 2016-04-20 (3768 days) · last repo commit 2024-07-24 · 1,349 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,963,671 downloads/mo, #3,405 on PyPI
Alternatives
Verify before relying
pip install pandasql
from pandasql import sqldf
pysqldf = lambda q: sqldf(q, globals())
result = pysqldf("SELECT * FROM my_dataframe LIMIT 10;")- Whether pandasql works with current pandas versions (last release 2016, pandas has evolved significantly)
- Exact Python version compatibility (requires_python is unspecified)
- Whether SQLite syntax coverage is complete for modern SQL features
What it is and what it does
pandasql is a thin wrapper that translates SQL queries into pandas operations, using SQLite syntax as the query language. It automatically detects pandas DataFrames in the calling scope and treats them as SQL tables, allowing you to write SELECT, JOIN, GROUP BY, and other SQL statements against them. The main entry point is the sqldf function, which takes a SQL query string and a namespace dict (typically globals() or locals()) to resolve DataFrame names.
The package was designed to lower the barrier for people familiar with SQL but new to pandas, providing a more intuitive interface for data manipulation and cleaning. However, it has been abandoned since 2016 with no active maintenance, creating significant compatibility concerns for modern Python and pandas environments.
Use it for
- Migrate SQL-based data workflows to Python without rewriting queries as pandas method chains
- Join multiple DataFrames using familiar SQL INNER/LEFT/RIGHT JOIN syntax
- Perform GROUP BY aggregations and window functions on DataFrames using SQL
- Prototype data transformations quickly if you think in SQL rather than pandas idioms
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last release 2016, no commits since July 2024 in archived repo) and has high install friction. Modern alternatives like DuckDB or Polars provide SQL-on-DataFrames with active maintenance, better performance, and compatibility with current Python versions. Use pandasql only if you have legacy code already depending on it; do not start new projects with it.
Install
pandasql on PyPI
Before you install
High install friction due to distribution format (egg and tarball only, no wheels). Package is abandoned as of 2016 with no maintenance since then, creating compatibility risk with modern Python and pandas versions.
Requires pandas to be installed separately; no explicit Python version support declared. Abandoned package may have compatibility issues with modern Python and pandas versions.
License in practice
MIT-like permissive license (copyright notice and permission text present) with no SPDX identifier recorded. Permissive for use but license treatment is marked unclear, so verify the exact terms before relying on it commercially.
Quickstart
pip install pandasql
from pandasql import sqldf
pysqldf = lambda q: sqldf(q, globals())
result = pysqldf("SELECT * FROM my_dataframe LIMIT 10;")
Verify before relying
- Whether pandasql works with current pandas versions (last release 2016, pandas has evolved significantly)
- Exact Python version compatibility (requires_python is unspecified)
- Whether SQLite syntax coverage is complete for modern SQL features
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,768 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 1,963,671 / month, #3,405 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: pandasql-0.7.3-py2.7.egg; pandasql-0.7.3.tar.gz
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 › “sql query pandas dataframes”
- pandasqlpandasql lets you query pandas DataFrames using SQL syntax instead of…
- qpdQPD translates SQL SELECT statements into pandas-like operations,…
- pandas-gbqpandas-gbq reads data from Google BigQuery into pandas DataFrames and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
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.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also qpd · connectorx · pandas-gbq · cloudsearch · ipython-sql · stats-can · bigframes · ibis-framework · pandasai · pangres