Skip to main content

No project description provided

Project description

Polars Extension for General Data Science Use

A Polars Plugin aiming to simplify common numerical/string data analysis procedures. This means that the most basic data science, stats, NLP related tasks can be done natively inside a dataframe.

Its goal is not to replace SciPy, or NumPy, but rather it tries reduce dependency for common workflows and simple analysis, and tries to reduce Python side code and UDFs.

See examples here.

Currently in Alpha. Feel free to submit feature requests in the issues section of the repo.

Getting Started

pip install polars_ds

and

import polars_ds

when you want to use the namespaces provided by the package.

Examples

Generating random numbers, and running t-test, normality test inside a dataframe

df.with_columns(
    pl.col("a").stats_ext.sample_normal(mean = 0.5, std = 1.).alias("test1")
    , pl.col("a").stats_ext.sample_normal(mean = 0.5, std = 2.).alias("test2")
).select(
    pl.col("test1").stats_ext.ttest_ind(pl.col("test2"), equal_var = False).alias("t-test")
    , pl.col("test1").stats_ext.normal_test().alias("normality_test")
).select(
    pl.col("t-test").struct.field("statistic").alias("t-tests: statistics")
    , pl.col("t-test").struct.field("pvalue").alias("t-tests: pvalue")
    , pl.col("normality_test").struct.field("statistic").alias("normality_test: statistics")
    , pl.col("normality_test").struct.field("pvalue").alias("normality_test: pvalue")
)

Blazingly fast string similarity comparisons. (Thanks to RapidFuzz)

df2.select(
    pl.col("word").str_ext.levenshtein("world", return_sim = True)
).head()

And a lot more!

Credits

  1. Rust Snowball Stemmer is taken from Tsoding's Seroost project (MIT). See here
  2. Some statistics functions are taken from Statrs (MIT). See here

Other related Projects

  1. Take a look at our friendly neighbor functime
  2. My other project dsds. This is currently paused because I am developing polars-ds, but some modules in DSDS, such as the diagonsis one, is quite stable.
  3. String similarity metrics is soooo fast and easy to use because of RapidFuzz

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_ds-0.1.4.tar.gz (80.4 kB view hashes)

Uploaded Source

Built Distributions

polars_ds-0.1.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

polars_ds-0.1.4-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (13.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

polars_ds-0.1.4-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (10.9 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

polars_ds-0.1.4-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (11.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ i686

polars_ds-0.1.4-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (10.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

polars_ds-0.1.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.3 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

polars_ds-0.1.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

polars_ds-0.1.4-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (13.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

polars_ds-0.1.4-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (10.9 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

polars_ds-0.1.4-pp39-pypy39_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (11.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ i686

polars_ds-0.1.4-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (10.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

polars_ds-0.1.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.3 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

polars_ds-0.1.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl (13.1 MB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ s390x

polars_ds-0.1.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (10.9 MB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ppc64le

polars_ds-0.1.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (10.0 MB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARMv7l

polars_ds-0.1.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.3 MB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARM64

polars_ds-0.1.4-cp312-none-win_amd64.whl (9.7 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

polars_ds-0.1.4-cp312-none-win32.whl (8.6 MB view hashes)

Uploaded CPython 3.12 Windows x86

polars_ds-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

polars_ds-0.1.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl (13.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ s390x

polars_ds-0.1.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (10.9 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ppc64le

polars_ds-0.1.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.3 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

polars_ds-0.1.4-cp312-cp312-macosx_11_0_arm64.whl (8.3 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

polars_ds-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl (9.8 MB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

polars_ds-0.1.4-cp311-none-win_amd64.whl (9.7 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

polars_ds-0.1.4-cp311-none-win32.whl (8.6 MB view hashes)

Uploaded CPython 3.11 Windows x86

polars_ds-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

polars_ds-0.1.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl (13.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ s390x

polars_ds-0.1.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (10.9 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ppc64le

polars_ds-0.1.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

polars_ds-0.1.4-cp311-cp311-macosx_11_0_arm64.whl (8.3 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

polars_ds-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl (9.8 MB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

polars_ds-0.1.4-cp310-none-win_amd64.whl (9.7 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

polars_ds-0.1.4-cp310-none-win32.whl (8.6 MB view hashes)

Uploaded CPython 3.10 Windows x86

polars_ds-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

polars_ds-0.1.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (13.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ s390x

polars_ds-0.1.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (10.9 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ppc64le

polars_ds-0.1.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

polars_ds-0.1.4-cp310-cp310-macosx_11_0_arm64.whl (8.3 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

polars_ds-0.1.4-cp310-cp310-macosx_10_12_x86_64.whl (9.8 MB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

polars_ds-0.1.4-cp39-none-win_amd64.whl (9.7 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

polars_ds-0.1.4-cp39-none-win32.whl (8.6 MB view hashes)

Uploaded CPython 3.9 Windows x86

polars_ds-0.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

polars_ds-0.1.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl (13.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ s390x

polars_ds-0.1.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (10.9 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ppc64le

polars_ds-0.1.4-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (11.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

polars_ds-0.1.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (10.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARMv7l

polars_ds-0.1.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (9.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page