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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe5019aacb554d23a18e0903ebb41c36b3f1d5542177245f4b3dbfa4eb3e4049
|
|
| MD5 |
25c2c3abec6ab84ca34f70220b5c7b6b
|
|
| BLAKE2b-256 |
85f272c6cd13ce12865ea9be5940859d93363b1a93d2e166e21faca6a6c556ec
|
File details
Details for the file polars_darwin_core-1.0.0-py3-none-any.whl.
File metadata
- Download URL: polars_darwin_core-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd6c885fbf24e5c3349b4be0c1916d814877733e97063dec3eb6daba5295c390
|
|
| MD5 |
bd04b74437530b5d1f047ae71e327833
|
|
| BLAKE2b-256 |
a52a635319353c691d5d9fa0ad97dc01b50bab8e6d10eb44c7a2592eeac29a13
|