Skip to main content

Helpers for working with Darwin Core (DwC) CSVs using Polars.

Project description

polars-darwin-core

Helpers for working with Darwin Core CSV data using polars.

Usage

Reading a single Darwin Core CSV file

from polars_darwin_core import DarwinCoreLazyFrame

lf = DarwinCoreLazyFrame.from_csv("occurrence.csv")
print(lf.collect())

Working with Darwin Core Archives (DwC-A)

import polars as pl
from polars_darwin_core import DarwinCoreLazyFrame

# Path to an unpacked Darwin Core Archive directory (containing meta.xml)
archive_path = "path/to/dwc/archive"

# Load the core file from the archive
lf = DarwinCoreLazyFrame.from_archive(archive_path)

# Work with the data
df = lf.filter(pl.col("kingdom") == "Animalia").collect()
print(df)

Development

# Create a virtualenv however you prefer, then:
pip install -e .[dev]

# Run the test-suite
python -m unittest

The project follows the standard PEP 517 build flow via Hatch:

python -m build    # create sdist and wheel in ./dist/

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

polars_darwin_core-4.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file polars_darwin_core-4.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polars_darwin_core-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0514ca2fb6f95e3c739715ea00e96da012b533c44ea153ce9e4634f33af0ff6e
MD5 49bf2126f230a6cd14485cf4309d63c7
BLAKE2b-256 3229c53a40fd1605de64705b42ee22ffff89e053850ddc4feb70b645c8ce3618

See more details on using hashes here.

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