--- id: pandasql version: "0.7.3" license: Copyright (c) 2013 Yhat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) license_treatment: unclear maintenance: abandoned --- # pandasql — sqldf for pandas License: unclear · Maintenance: abandoned · Downloads: 2.0M/mo ## 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 above — verify before relying. pandasql lets you query pandas DataFrames using SQL syntax instead of pandas methods, bridging SQL familiarity with DataFrame manipulation. 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 pip install pandasql uv add pandasql poetry add pandasql ## Installing pandasql 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. 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;") Requires pandas to be installed separately; no explicit Python version support declared. Abandoned package may have compatibility issues with modern Python and pandas versions. 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: Copyright (c) 2013 Yhat, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (unclear) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 2.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sql query pandas dataframes, sqldf for python, sql syntax dataframe, query dataframes with sql, pandas sql interface, sqlite dataframe queries, sql-interface, abandoned [View on SkillFed](https://skillfed.io/packages/pandasql) · [View on PyPI](https://pypi.org/project/pandasql/)