Skip to main content

A Python library for working with digital scholarly editions in polars dataframes.

Project description

dse_polars

Work with DSE triples in a polars dataframe

ctsurn_contains usage

ctsurn_contains returns a Polars expression, so you can use it directly in filter/select.

import polars as pl
from dse_polars.texts import ctsurn_contains

df = pl.DataFrame(
	{
		"urn": [
			"urn:cts:compnov:bible.genesis.sept_latin:1.1",
			"urn:cts:compnov:bible.genesis.sept_latin:2.1",
			"urn:cts:compnov:bible.exodus.sept_latin:1.1",
		]
	}
)

query = "urn:cts:compnov:bible.genesis:1"

matches = df.filter(ctsurn_contains(pl.col("urn"), query))
print(matches)

# quick boolean check with literals
is_contained = pl.select(
	ctsurn_contains(
		"urn:cts:compnov:bible.genesis.sept_latin:1.1",
		"urn:cts:compnov:bible.genesis:1",
	).alias("ok")
).item(0, 0)
print(is_contained)  # True

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

dse_polars-0.2.0.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

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

dse_polars-0.2.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file dse_polars-0.2.0.tar.gz.

File metadata

  • Download URL: dse_polars-0.2.0.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dse_polars-0.2.0.tar.gz
Algorithm Hash digest
SHA256 35bc85e568da53b32580d30dceed3ebdd88dc1b6f31de693ded9dbd68635a152
MD5 ce38b16bbba954e62a63104828911afb
BLAKE2b-256 7a15fe2d5975727829b59295ccceb736b849f038ba1dfa563c2fb4cc10f04c82

See more details on using hashes here.

Provenance

The following attestation bundles were made for dse_polars-0.2.0.tar.gz:

Publisher: publish.yml on neelsmith/dse_polars

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

File details

Details for the file dse_polars-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dse_polars-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dse_polars-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d63d002d150094a2575bdfcdc7098e615beab2131b91350de09b26cb1518092
MD5 4e1f9ed52478ef6565b414d6f31c1787
BLAKE2b-256 9421fd40f0ffb47665bf05e740490f25f392fb6f0f02fedfffdb7cadcb3be360

See more details on using hashes here.

Provenance

The following attestation bundles were made for dse_polars-0.2.0-py3-none-any.whl:

Publisher: publish.yml on neelsmith/dse_polars

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