Skip to main content

Extract data from a bunch of files and load into a table

Project description

Elbow

Elbow is a library for extracting data from a bunch of files and loading into a table (and that's it).

Examples

import json

from elbow import load_table, load_parquet

# Extract records from JSON-lines
def extract(path):
    with open(path) as f:
        for line in f:
            record = json.loads(line)
            yield record

# Load as a pandas dataframe
df = load_table(
    pattern="**/*.json",
    extract=extract,
)

# Load as a parquet dataset (in parallel)
dset = load_parquet(
    pattern="**/*.json",
    extract=extract,
    where="dset.parquet",
    workers=8,
)

Installation

A pre-release version can be installed with

pip install elbow

Other (better) projects

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elbow-0.1.0a1.tar.gz (31.0 kB view hashes)

Uploaded Source

Built Distribution

elbow-0.1.0a1-py3-none-any.whl (26.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page