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 Distribution

polars_darwin_core-3.0.0.tar.gz (3.9 MB view details)

Uploaded Source

Built Distribution

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

polars_darwin_core-3.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file polars_darwin_core-3.0.0.tar.gz.

File metadata

  • Download URL: polars_darwin_core-3.0.0.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for polars_darwin_core-3.0.0.tar.gz
Algorithm Hash digest
SHA256 2214a01693572e68302b46bd90d915eaa0ade80c5ad9b0a2e896259c915e1159
MD5 f4b3ef41edda061a1c9578d54f383dfc
BLAKE2b-256 3d9909a32906d399ea62b42dd020450f91b5cd6e238814ce8741e68e44c1f89b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_darwin_core-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e8f4baf774814a0e8e0ca8a1f9fcbc88bfdac0f793c72b870e78e5ee194578e
MD5 5faa83a7680f71bf322d299151dc5e8e
BLAKE2b-256 11c2560676bec1d237f59f14c5d9e2e2c0e9f0176aba19300954b9a72e774e98

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