Utility libraries for working with PostgreSQL
Project description
When analyzing large datasets, it can often be useful to let the database do as much of the analysis as possible. While Pandas is great at manipulating datasets that are large enough to fit on one machine, but possibly not large enough to fit into memory, concerns over performance and data security can sometimes make analysis in the database more convenient.
This package is built for use with PostgreSQL. Support for other databases might follow (but don’t hold your breath).
Note
The Table API has significantly changed from 0.3.x to 0.4.0. In particular, schema and connection parameters are now optional (replaced with your username and a fresh connection, respectively). This leaves the table name as the only required parameter for many of these methods. If table_name is already qualified with a schema (eg "foo.bar"), then pg-utils will Do The Right Thing and just set schema="foo" and table_name="bar".
Goals
The goals for this package are:
Providing a simple Connection object that builds easy connections to the database based off of environment variables (overridden with parameters, if specified).
Mocking Pandas Series and DataFrame objects with metadata constructs of Column and Table (respectively). Columns and Tables will implement some parts of the Pandas API that do calculations in the database.
Possibly other tools for automation of simple tasks and conveniently displaying metadata (if needed).
Non-Goals
This package will never be:
An object-relational mapper (ORM). The only SQL-ish operations will be those that are implemented and that mock SQL-ish bits of the Pandas API for Series and/or DataFrames.
Installation
It’s up on PyPI. So, just do
pip install pg-utils
for the base package, or
pip install pg-utils[graphics]
to install Seaborn for graphical visualizations.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pg_utils-0.4.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6ec8cebfdbdd1d301d4395dd180303eac5523d4216923005b34dd9704b27628 |
|
MD5 | 0d81e8deb3d843f71f2545fdf9396920 |
|
BLAKE2b-256 | 7f905f5c018bf46ab81e7e9a281e07879f380af3939d1381d72b9b1a64a636a4 |