Hellooo :)
This plugin is a work-in progress, main goal is to provide distance metrics on list, arrays and string datatypes.
The docs can be found here: https://ion-elgreco.github.io/polars-distance/
Examples
import polars
import polars_distance as pld
df = pl.DataFrame({
"foo":"hello",
"bar":"hella world"
})
df.select(
pld.col("foo").dist_str.hamming('bar').alias('dist')
)
┌──────┐
│ dist │
│ --- │
│ u32 │
╞══════╡
│ 7 │
└──────┘
df.select(
pld.col('foo').dist_str.levenshtein('bar').alias('dist')
)
┌──────┐
│ dist │
│ --- │
│ u32 │
╞══════╡
│ 6 │
└──────┘
df = pl.DataFrame(
{
"arr": [[1, 2, 10]],
"arr2": [[2, 5, 9]],
},
schema={
"arr": pl.Array(inner=pl.Float64, width=3),
"arr2": pl.Array(inner=pl.Float64, width=3),
},
)
df.select(pld.col('arr').dist_arr.euclidean('arr2').alias('dist'))
shape: (1, 1)
┌──────────┐
│ dist │
│ --- │
│ f64 │
╞══════════╡
│ 3.316625 │
└──────────┘
Metadata
Release files for polars-distance 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| polars_distance-0.5.3.tar.gz | 38.2 kB | Details |
Built distributions (wheels)
Total release size: 48.5 MB
Release files / polars_distance-0.5.3.tar.gz
| Download URL | polars_distance-0.5.3.tar.gz |
|---|---|
| Size | 38.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26b7fbfc38de1c81b847ffa87b4f106dd10d4585a2240fff882e0f1fcb1acad8
|
|
BLAKE2b-256 checksum How to use checksums |
f489c689e461dffc5eeded2927cb214aae20f1103ff5e2b5e0c7042dff81f74c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-win_amd64.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
48e90994ae0e7945572a6d70f7711cb2d9101ea338fa993488d405e7492ab389
|
|
BLAKE2b-256 checksum How to use checksums |
4e029658eee9c2a47013ee9def21cc8917b946503db8f5eea098da72b91288cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-win32.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-win32.whl |
|---|---|
| Size | 5.1 MB |
| Tags | CPython 3.8 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
59d21c12c4ef628f201ba7ed815015c1dcf0be842984275923fab03e89bfe02c
|
|
BLAKE2b-256 checksum How to use checksums |
54ed5ff29878c01a153c4fcbd08668bd200c12430ed80a4cfd04ccff78046326
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 5.4 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
bbdba9190b1b34f1c609540ac0d2a34be3563fb6d0f751ad1e2ed916dbd7c6fb
|
|
BLAKE2b-256 checksum How to use checksums |
c3a4cba0275a1cc313507de399c01ff695df6e84a9164f7ece5615ce30c0b0f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 5.8 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ PowerPC 64-le abi3 |
|
SHA-256 checksum How to use checksums |
bdfc5b840389a266e3b850a1320037c1a9419b0e58ab45dc01889dc8948870be
|
|
BLAKE2b-256 checksum How to use checksums |
fc3df08df8558489ba66401a3ba382c11a0f9b3d225ba100e8e1511991f272f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
21ca13be28d7a4e220a8a5d7276e6dfda6a507e799cfb714ac3c016bbcbd2ce9
|
|
BLAKE2b-256 checksum How to use checksums |
948216f10aefc3b1d87050cc29fc1dc3e9c18b8ec557742da53e02a25fcbf902
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 5.0 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
6c73567844fcf354b6e3387beb1253130d1fa09969100af5c51016f9e55f506d
|
|
BLAKE2b-256 checksum How to use checksums |
4e77b2476cfde9a0ec2e00f4cea5ab9db668b31cf61236377be8dd53f28538a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
2bcf6f32ebf7b8efa258393ea58175abf5844379cc9acf239767927fe989aada
|
|
BLAKE2b-256 checksum How to use checksums |
657bd099a1ac0a8f06cd4b184cdb575004696d902142ec0e9f8dafa02b9c94d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 4.8 MB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a47c033d1b9bcf376d8d15d74f0ad60bf98594fad08ca906c1f4b93907e19104
|
|
BLAKE2b-256 checksum How to use checksums |
c707495504f4c42b4fb22162267b3ac6abe9f0665001547f4d54226c7d52434d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|
Release files / polars_distance-0.5.3-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | polars_distance-0.5.3-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.4 MB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
80c01b3210588987d917d85db2a0c12fb9ab5a71d6a7c519e318be139ef6ad5a
|
|
BLAKE2b-256 checksum How to use checksums |
c3cb55546cb7eaf22ab5d25df6f863f79dcfe6545c2889a12d1136b833c80388
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.8.3
|