Skip to main content

Polars plugin for generating random distributions

Project description

polars-random

Polars plugin for generating random distributions.

Description

polars-random is a Rust plugin for the Polars DataFrame library that provides functionality to generate random numbers through a new expression namespace called "random". It supports generating random numbers from various distributions such as uniform, normal, and binomial.

Installation

To use polars-random, install it using your favourite tool:

uv add polars-random
poetry add polars-random
pip install polars-random

Usage

Here are some examples of how to use the polars-random plugin:

Uniform Distribution

import polars as pl
import polars_random

df = pl.DataFrame({
    "values": [1.0, 2.0, 3.0]
})

random_series = (
    df
    .select(
        pl
        .col("values")
        .random.rand(seed=42)
    )
)

print(random_series)

Normal Distribution

import polars as pl
import polars_random

df = pl.DataFrame({
    "values": [1.0, 2.0, 3.0]
})

random_series = (
    df
    .select([
        pl
        .col("values")
        .random.normal(mean=0.0, std=1.0, seed=42)
    ])
)

print(random_series)

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

polars_random-0.2.0.tar.gz (79.0 kB view details)

Uploaded Source

Built Distributions

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

polars_random-0.2.0-cp38-abi3-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.8+Windows x86-64

polars_random-0.2.0-cp38-abi3-win32.whl (3.4 MB view details)

Uploaded CPython 3.8+Windows x86

polars_random-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

polars_random-0.2.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (4.6 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ppc64le

polars_random-0.2.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (4.7 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ i686

polars_random-0.2.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.3 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARMv7l

polars_random-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

polars_random-0.2.0-cp38-abi3-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

polars_random-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: polars_random-0.2.0.tar.gz
  • Upload date:
  • Size: 79.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.1

File hashes

Hashes for polars_random-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f871b285146afd55b4c43f645ac46a536219e75ba96aa76fbc2a9f33f9fba92b
MD5 8d8976213d10ce5e69d941231d6f3879
BLAKE2b-256 48c46ed5c9084df1bdfad0414102fed251d3ae4750f506431a8ef498f9e8e612

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b14a63264ee896e2d2f988a4821e6cf269830adff84708909476ed0a14612499
MD5 d76f5b9081bd050d0c496aa9b75407e5
BLAKE2b-256 2a7a1eb66692ef7a5b4076883fe1a85eb2bdda4cf4a5ffe56fd32e9ca6dafc7a

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-win32.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 6bdef2c97e6f9382df511c07826079920425c28dc97fc5497b68f1e0d6dfd1ea
MD5 a697f8244f7a02345bd1964e4130a0c7
BLAKE2b-256 8e9114c8deb2214ea3a6367d49ab0cf2a874b3298fff74e61ceb9a9171d2e474

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eadd77a097c52aefc7e35c923a269ed1bb5774d5206750167ce6fc58539ee193
MD5 f69bbf812b7c93b1f4f14b576ecbf1f2
BLAKE2b-256 f822520fac7e4b73bddc30d4f1d11127f9185b6cdef8f783b7fb71ca7afdd295

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 e5703df347d2252e12dad2ad3a63a548201d9603f8953e7a686f792cbc326230
MD5 02e3035648eedc6599bd9e2c772ec318
BLAKE2b-256 479c4502063453ab5e81c4f8bb11d67c5fac78a06f2361bbb96fdc1b41c67f30

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 dbed3593723c759f70d61dd992b8c5a1068c52e6431e51860ebebce83e2b41f2
MD5 3c390327367333efc2f1d28ccf84bf1a
BLAKE2b-256 2ff3db7bb2d91fb56e6a5186ce49c15e3e1badb792fb2592c3c6a719913fbe2e

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 e150f8bf6dcba6710c7e79af7dc5c9265b22e6dabca4b85c25317c93f4f3ce39
MD5 16c34e5904a7ffc88f5f196e0f043771
BLAKE2b-256 fa163639b287977ddc76f8acd4854875bacc2f9cb8a605fbe7f32aa64a05cb44

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 05623ef59474fd3e39b60d757e29617edbc2a87647073307af4fc617d932c38b
MD5 7af44856b781f1254ab11887ce19fe16
BLAKE2b-256 9fe4d2df320f14ed330ef0eb0df9d1dd818113667ad64044d450035e43de5d1b

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4141c13c0bf4f4122c99b5cb4eb977f369a8fa0adb6b1ffb40dbbd845bba4238
MD5 0cdcad485c2bd7ce92dc14b24428909c
BLAKE2b-256 cf7b15ef97567135438644c36db2f7226dd92949375d611e87c9cd55c8ab6fcb

See more details on using hashes here.

File details

Details for the file polars_random-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for polars_random-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1ba42737d3f0d6fe133d8695a84c0475c8bcf1ec7c285fc13c615b092aa65473
MD5 f92f5b0bd00a2374cf35441bc94703d6
BLAKE2b-256 ce862d527cbaeaa8819e587632b5849d774ba20283d130aa3b09ceb11f154604

See more details on using hashes here.

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