[ANN] Squint: Simple query interface for tabular data.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Squint: Simple query interface for tabular data.

Shawn Brown
[RESEND WITH CORRECTED LINK]


Squint version 0.1.0 has been released:


* New query previews provide convenient feedback at the interactive prompt.

* Completely rewritten tutorial
https://squint.readthedocs.io/en/stable/tutorial/
<https://squint.readthedocs.io/tutorial/>

* Added support for Python 3.9 and dropped support for 3.3, 3.2, and 2.6.



What is Squint:


Squint is a simple query interface for tabular data. A core feature of
Squint is that the structure of a query's selection determines the
structure of its result.



Squint is available from the PyPI:


    pip install squint



With Squint You Can:


* Select data using Python literals—sets, lists, dictionaries, etc.—and
fetch results in the same format.

* Aggregate, map, filter, reduce, and otherwise manipulate data.

* Lazily iterate over results, write them to a file, or eagerly evaluate
them in memory.

* Analyze data from CSV, Excel, SQL, and other data sources.


Links:


* Docs: https://squint.readthedocs.io/

* PyPI: https://pypi.org/project/squint/

* Source: https://github.com/shawnbrown/squint



Syntax Comparison:


    # SQL

    SELECT A, SUM(B) FROM mydata WHERE C='xyz' GROUP BY A;



    # Pandas

    df[['A', 'B']][df['C'] == 'xyz'].groupby('A').sum()



    # Squint

select({'A': 'B'}, C='xyz').sum()


Note: Squint uses `dict` objects to select groups of values—the *key*
determines the field to group by, and the *value* determines the contents
of each group. Fetching the results of such a query returns a dictionary of
selected elements.
--
Python-announce-list mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
https://mail.python.org/mailman3/lists/python-announce-list.python.org/

        Support the Python Software Foundation:
        http://www.python.org/psf/donations/