datafusion-extra-functions 0.5.5


pip install datafusion-extra-functions

  Latest version

Released: Sep 17, 2026

Project Links

Meta
Requires Python: >=3.10

Classifiers

Programming Language
  • Python :: 3
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Rust

License
  • OSI Approved :: Apache Software License

datafusion-extra-functions (Python)

Python wheels for datafusion-extra-functions, exposing each aggregate through datafusion-python's __datafusion_aggregate_udf__ PyCapsule protocol.

Usage

from datafusion import SessionContext, col, udaf
import datafusion_extra_functions as extra

extra.list_functions()
# ['mode', 'max_by', 'min_by', 'kurtosis', 'skewness', 'kurtosis_pop']

skew = udaf(extra.udaf_by_name("skewness"))

ctx = SessionContext()
df = ctx.from_pydict({"a": [1.0, 2.0, 2.0, 9.0]})
df.aggregate([], [skew(col("a"))]).show()

Or register for SQL:

ctx.register_udaf(udaf(extra.udaf_by_name("mode")))
ctx.sql("SELECT mode(a) FROM my_table").show()

Version compatibility

The DataFusion FFI ABI is tied to the datafusion major version this package was compiled against. The wheel pins datafusion>=55,<56. A mismatch fails at the FFI boundary rather than with a clean error.

Building from source

From this python/ directory, with a Rust toolchain (see rust-version in Cargo.toml):

pip install maturin
maturin develop --release

License

Apache-2.0, same as the crate it binds.

Extras: None
Dependencies:
datafusion (<56,>=55)