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.3.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.3.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dse_polars-0.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 161d7fa0915b711c640f4dce6e00fa9f46571093c4fef6e83bfba4cbce2a14cf
MD5 e9873cb473e484e5d2e35357df69f7e9
BLAKE2b-256 a5fd2114a0806e71f5c4109d3ea1a9123a135d2fe9b7953801ca00f5ce2b31a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for dse_polars-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: dse_polars-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b464d7029ae5fa8b76e5f20863f9e289093d554e8af3418dd55984dcba14e4f
MD5 b1ad6dc1bb8a5a2850b45151020aae4a
BLAKE2b-256 2ed5f21209f2bd24ccb146a1083dba16277c2cc59a575b7967b05bdc48157979

See more details on using hashes here.

Provenance

The following attestation bundles were made for dse_polars-0.3.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