Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python.announce > #3299
| From | Shawn Brown <03sjbrown@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python.announce |
| Subject | [ANN] Squint: Simple query interface for tabular data. |
| Date | 2020-01-11 15:03 -0500 |
| Message-ID | <157878285175.21108.python-announce-list@python.org> (permalink) |
| References | <CA+a2dP-4980y3YdcnDv4r8Ls2Mz1_jG2zpPLnbwv0j0mmSrENg@mail.gmail.com> |
[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.
Back to comp.lang.python.announce | Previous | Next | Find similar | Unroll thread
[ANN] Squint: Simple query interface for tabular data. Shawn Brown <03sjbrown@gmail.com> - 2020-01-11 15:03 -0500
csiph-web