querier | Star

PyPI PyPI - License Downloads Last Commit

Welcome to querier's website.

Presentation

Data Frames are widely used and useful structures for data wrangling. The querier exposes a query language for Python pandas Data Frames, inspired from SQL's relational databases querying logic.

There are currently 9 main types of operations available in the querier, with no plan to extend that list much further (to maintain a relatively simple mental model). These verbs will look familiar to dplyr users, but the implementation (numpy, pandas and SQLite3 is used) and functions' signatures are different:

  • concat: concatenates 2 Data Frames, either horizontally or vertically
  • delete: deletes rows from a Data Frame based on given criteria
  • drop: drops columns from a Data Frame
  • filtr: filters rows of the Data Frame based on given criteria
  • join: joins 2 Data Frames based on given criteria (available for completeness of the interface, this operation is already straightforward in pandas)
  • select: selects columns from the Data Frame
  • summarize: obtains summaries of data based on grouping columns
  • update: updates a column, using an operation given by the user
  • request: for operations more complex than the previous 8 ones, makes it possible to use a SQL query on the Data Frame

The querier’s source code is available on GitHub. You can read posts about the querier in this blog

Installing

  • From Pypi:
pip install querier 
  • From Github, for the development version:
pip install git+https://github.com/Techtonique/querier.git