# yhat/pandasql

sqldf for pandas

Repository: https://github.com/yhat/pandasql
Canonical: https://ross.abutalabs.com/products/pandasql
Language: Python
License: MIT
License Family: permissive
Archived: true
Last push: 2024-07-24T14:51:15+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4945, "days_push": 770, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1348, forks 184 (observed 2026-08-28T04:04:27.713125+00:00)

## What it is
pandasql is a Python library that lets you query pandas DataFrames using SQL syntax, similar to sqldf in R. It translates SQL queries (SQLite dialect) against in-memory DataFrames so users can manipulate and clean data with familiar SQL.

## Use cases
- query pandas dataframes with sql
- run sql joins on dataframes
- aggregate dataframe data with group by in sql
- clean data using sql instead of pandas api
- use sqldf in python
- filter dataframes with sql select statements

## When to choose
- you know SQL better than the pandas API
- you want quick ad-hoc SQL queries against DataFrames in notebooks
- you need joins or aggregations expressed in SQLite syntax

## When to avoid
- you need a database other than SQLite semantics or advanced SQL features
- performance-critical pipelines where native pandas operations are faster
- you need actively developed features or long-term support

## Facets
- artifact type: library
- maturity: maintenance
- function: database, data-science, parser
- domain: data-science, databases, developer-tools
- platform: python, cross-platform
- tags: pandas, sql, sqldf, dataframes, sqlite

## Member repositories
- yhat/pandasql (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:27.713125+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:42:35.132264+00:00, confidence not recorded.
  - readme: https://github.com/yhat/pandasql (fetched 2026-08-28T04:04:27.713125+00:00, sha 34b73472935f)
  - registry_pypi: https://pypi.org/pypi/pandasql/json (fetched 2026-08-29T12:01:27.306915+00:00, sha 09cdb5f96791)
- Data as of 2026-08-30T08:39:29.467469+00:00.
