Skip to main content

Less verbose Mathematical exp evaluator for pandas,numpy and polar

Project description

colss

colss is a lightweight expression evaluator for NumPy, Pandas, and Polars. It simplifies mathematical expressions while preserving memory efficiency and execution speed.


Installation

pip install colss

Requirements

All arrays passed to colss must be:

  • 1D
  • Preferably float64
  • C-contiguous

If you have a 2D array:

a = a.ravel()

Usage Examples

All functions accept string expressions.

query

import numpy as np
import colss

a = np.array([1.0, 2.0, 3.0], dtype=np.float64)
b = np.array([4.0, 5.0, 6.0], dtype=np.float64)

result = colss.query("a+b+7")

Ternary example:

colss.query("a > 1 ? 100 : 0")

Using mathematical functions:

colss.query("sqrt(a) + sin(a)")
colss.query("exp(a)")

mean

import numpy as np
import colss

a = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float64)

m = colss.mean("a")

Expression example:

colss.mean("a+10")

sigma (sum)

import numpy as np
import colss

a = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float64)

s = colss.sigma("a")

Expression example:

colss.sigma("a*2")

prod (Product)

import numpy as np
import colss

a = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float64)

p = colss.prod("a")

Expression example:

colss.prod("a+1")

Supported Operators

Arithmetic:

+  -  *  /  ^ %

Comparison:

>  <  >=  <=  ==  !=

Logical:

and  or not

Ternary:

condition ? value_if_true : value_if_false

Available Functions Inside Expressions

abs(x)
sqrt(x)
pow(x, y)
log(x)
log10(x)
exp(x)
sin(x)
cos(x)
tan(x)
floor(x)
ceil(x)
min(x, y)
max(x, y)

Using with Pandas

import pandas as pd
import numpy as np
import colss

 df = pd.DataFrame({
    "a": [1.0, 2.0, 3.0],
    "b": [4.0, 5.0, 6.0]
})

# Pandas evaluation
 df["c"] = df.eval("a + b + 7")

# colss evaluation
 a = df["a"].to_numpy(dtype=np.float64)
 b = df["b"].to_numpy(dtype=np.float64)

 df["d"] = colss.query("a+b+7")

Notes

  • All variables used in expressions must be registered inside colss before evaluation.
  • All functions (query, mean, sigma, prod) accept string expressions.
  • Designed for memory efficiency and predictable performance.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

colss-0.1.8-cp313-cp313-win_amd64.whl (806.0 kB view details)

Uploaded CPython 3.13Windows x86-64

colss-0.1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

colss-0.1.8-cp313-cp313-macosx_15_0_arm64.whl (958.9 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

colss-0.1.8-cp312-cp312-win_amd64.whl (805.7 kB view details)

Uploaded CPython 3.12Windows x86-64

colss-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

colss-0.1.8-cp312-cp312-macosx_15_0_arm64.whl (958.7 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

colss-0.1.8-cp311-cp311-win_amd64.whl (804.3 kB view details)

Uploaded CPython 3.11Windows x86-64

colss-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

colss-0.1.8-cp311-cp311-macosx_15_0_arm64.whl (956.9 kB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

colss-0.1.8-cp310-cp310-win_amd64.whl (803.9 kB view details)

Uploaded CPython 3.10Windows x86-64

colss-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

colss-0.1.8-cp310-cp310-macosx_15_0_arm64.whl (955.5 kB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

colss-0.1.8-cp39-cp39-win_amd64.whl (804.4 kB view details)

Uploaded CPython 3.9Windows x86-64

colss-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

colss-0.1.8-cp39-cp39-macosx_15_0_arm64.whl (955.6 kB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

Details for the file colss-0.1.8-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: colss-0.1.8-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 806.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for colss-0.1.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5981c898cae054a6ac60662da1836cab6a7ec14c7ba324b5ecb3dc68ab6a1db6
MD5 5df88b29feb43f69c73ae81d0af39bdb
BLAKE2b-256 8a9c096411e3221a7720293378babebc7e981c68076fa1dd9c82a030695f132f

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp313-cp313-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d276cd08b80ff347aad868619934a3e300b2e7de9a096055da81994cd9acc544
MD5 a7f06f059918b81f39e3f769dc1252ce
BLAKE2b-256 2395f9849ebb01b9f4ea77ab36520d2624a54cf097c2496f8cb0e247fdd06410

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a3784dc6b59393fba6a25069318cf5a30d8226b306b7f06ee3001edd893bacc9
MD5 2aa8dc3de717b28ba3581505b543caa4
BLAKE2b-256 7df167365ebc53fadf22673922695910f960eead520d55d4e95da7276ed33876

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp313-cp313-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: colss-0.1.8-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 805.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for colss-0.1.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2cd229d77f19e0a5218d918ca4b651aac63a7c36b5dc3a3457bd20cf3e9e4dcd
MD5 d2b8ca17418636523fc6aad83ccec0a6
BLAKE2b-256 659df6dff51019d541666953b10ff64db42c24e0f2260c02693a04efa432ea1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp312-cp312-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6156915b42c4cfa95e64e8852c375aeb4cc87c9e9e2441b12b001fa6794a315
MD5 f9ebef30b2acd4028f4cbd131fc09186
BLAKE2b-256 9d8d86ca354451d91e964ebb77da31aad3f4d83723b89a8a26596de27ce5e7aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e24a732f10fa722f4d0269d8cdfa60e76847e270c71d11375aa71d2eda452e5e
MD5 1fae51d158542228a5f2245091edf378
BLAKE2b-256 575af01a288b796fa56ed5efad950baf132033ffa3bb35919038b7b280618437

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp312-cp312-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: colss-0.1.8-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 804.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for colss-0.1.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a5ed786f43c9fcad7274e2af416132bc6764c38cffd3db0a09713ce41012e0bb
MD5 f6daa663c454f092d8895dfaf0f8671f
BLAKE2b-256 122e9c61dc59d737ba3f00c536f19077a2313ffd01778a1fe8b8c6eaebc3e3dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp311-cp311-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3099bf9f7b121639bd7acb198a8c10f47c8bb03fca9075e3c9bd54c0f2e4457b
MD5 97ea6481d63717888e2da1509f18700b
BLAKE2b-256 24fc8f6000ca86f55648d69d7cec68c3b6fb1c360cdbafae63b00e05991a08f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e9f31fc9c6a6818ecb895619d2e1468471f087c73b8df5593ecc953860e52cbb
MD5 45a12a48249f79f01871ce6189451459
BLAKE2b-256 f5c82b9f760589310cb8c0e9fbcaf37cc6a44a9c393dd2aff4af79328704aeb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp311-cp311-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: colss-0.1.8-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 803.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for colss-0.1.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8fbbe962d4558996661f4372a33e029cc888865971a3b21b3b42e61bc89acf80
MD5 9a9abde3559dcb0cf4a4a2ede05580a7
BLAKE2b-256 57366901130bc62eaf8308280f68afe9ec851b5fb27777393f042df0f5821cef

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp310-cp310-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fe4fd2511ca352589e2a2e350d636ff1e5ea69c5be65c261f03bc00d01de13c8
MD5 951c4f1539ff709a0f6ccbe9dae9d9d1
BLAKE2b-256 db0f7d97acf388c8495c8600c1614b7f0c41fada42cfb4a8e0e446e830d2ff9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 26ba07aaea117010148bd9928feeb859784ab9fbc32d02ee7812598d7b03ff8a
MD5 8a89009ea92d5f6abef3a425d6f6146a
BLAKE2b-256 82b30b68a47ef4bb35faa005f08c81240efc6bb06b2f26cbb5336a6564a94752

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp310-cp310-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: colss-0.1.8-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 804.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for colss-0.1.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5ef1c7bd02fa059544e08a6d5bb668595fc452aa2ac7df6f1f4a94ad76e94678
MD5 b0b29888b99f54f94076b85c83bbc409
BLAKE2b-256 bc10a814e23190b89ab8cdaa1d53ce5a6366b5f5cd244443ca5f6d4e0f0ef592

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp39-cp39-win_amd64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for colss-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 366f0ef7e29e4a094287186d03cf6f491eb7d9bade74a4c19eef7e99d68fa1f8
MD5 68dccf8b75d6f07c7840604176860e36
BLAKE2b-256 d57e67d1c3b6245e5c22984628969189851b32bba2e1781ae6980363142c985b

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on SivaPA08/colss

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

File details

Details for the file colss-0.1.8-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

  • Download URL: colss-0.1.8-cp39-cp39-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 955.6 kB
  • Tags: CPython 3.9, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for colss-0.1.8-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 284b4a9da34c3f213cfd65d9d658990db074557197e3dd2fbd4ba67b7bdef41d
MD5 280e51baf6e9f3acc00edb8340361fc0
BLAKE2b-256 17311d454e41871dbe44eec03497bf8c6949a6851287eb79faaa285be1fd58f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for colss-0.1.8-cp39-cp39-macosx_15_0_arm64.whl:

Publisher: wheels.yml on SivaPA08/colss

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