Skip to main content

The power of duckdb with the ease of pandas

Project description

Lazy Pandas

Lazy Pandas is a Python library that simplifies the use duckdb wrapping the pandas API. This library is not a pandas replacement, but a way to use the pandas API with DuckDB. Pandas is awesome and adopted by many people, but it is not the best tool for datasets that do not fit in memory. So why not give the power of duckdb to pandas users?

Installation

To install Lazy Pandas, you can use pip:

pip install lazy-pandas

Usage

Here is a basic example of how to use Lazy Pandas:

import lazy_pandas as lp

df = lp.read_csv(location, parse_dates=["pickup_datetime"])
df = df[["pickup_datetime", "passenger_count"]]
df["pickup_date"] = df["pickup_datetime"].dt.date
df = df.sort_values("pickup_date")
df = df.collect()  # Materialize the lazy DataFrame to a pandas DataFrame

Features

  • Lazy evaluation
  • SQL support
  • Support for DuckDB extensions (e.g., Delta, Iceberg, etc.)

Contribution

Contributions are welcome! Feel free to open issues and pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

lazy_pandas-0.1.0.tar.gz (316.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazy_pandas-0.1.0-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file lazy_pandas-0.1.0.tar.gz.

File metadata

  • Download URL: lazy_pandas-0.1.0.tar.gz
  • Upload date:
  • Size: 316.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for lazy_pandas-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b3bffb92946f794b11c3b6dbf2e829592bb7f6ef0d955dd13a771073c99e167
MD5 b9d0a52b34074bf9e27078686671469d
BLAKE2b-256 fd604fb2da6f9ca9611fb8b456c56507227a71799c8be3b83ded79f04eaf714e

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazy_pandas-0.1.0.tar.gz:

Publisher: pipeline.yaml on mariotaddeucci/lazy-pandas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lazy_pandas-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lazy_pandas-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for lazy_pandas-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 83499936537d49fd3acd6ee44fb5a8646c5db017a4fbe8b777814424b30b06ab
MD5 7a8b474ccb3684a03203c6cc31b38e45
BLAKE2b-256 49bef4f578d4bdf3ee312e46e0f2632cea5b19c001b40cffa9d12d412e572bc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazy_pandas-0.1.0-py3-none-any.whl:

Publisher: pipeline.yaml on mariotaddeucci/lazy-pandas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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