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 read_darwin_core_csv

lf = read_darwin_core_csv("occurrence.csv")
print(lf.collect())

Working with Darwin Core Archives (DwC-A)

import polars as pl
from polars_darwin_core import scan_archive

# 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 = scan_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-1.0.0.tar.gz (1.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-1.0.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: polars_darwin_core-1.0.0.tar.gz
  • Upload date:
  • Size: 1.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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fe5019aacb554d23a18e0903ebb41c36b3f1d5542177245f4b3dbfa4eb3e4049
MD5 25c2c3abec6ab84ca34f70220b5c7b6b
BLAKE2b-256 85f272c6cd13ce12865ea9be5940859d93363b1a93d2e166e21faca6a6c556ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for polars_darwin_core-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd6c885fbf24e5c3349b4be0c1916d814877733e97063dec3eb6daba5295c390
MD5 bd04b74437530b5d1f047ae71e327833
BLAKE2b-256 a52a635319353c691d5d9fa0ad97dc01b50bab8e6d10eb44c7a2592eeac29a13

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