diff --git a/docs/complex_ext.md b/docs/complex_ext.md new file mode 100644 index 00000000..f32d92cb --- /dev/null +++ b/docs/complex_ext.md @@ -0,0 +1,3 @@ +## Extension for Complex Numbers + +::: polars_ds.complex_ext \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..e645991e --- /dev/null +++ b/docs/index.md @@ -0,0 +1,44 @@ +# Polars-ds + +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, without leaving dataframe world. This also means that for simple data pipelines, you do not need to install NumPy/Scipy/Scikit-learn, which saves a lot of space, which is great under constrained resources. + +Its goal is NOT to replace SciPy, or NumPy, but rather it tries reduce dependency for simple analysis, and tries to reduce Python side code and UDFs, which are often performance bottlenecks. + +## Getting Started +```bash +pip install polars_ds +``` + +and + +```python +import polars_ds +``` +when you are using the namespaces provided by the package. + +## Examples + +Generating random numbers, and running t-test, normality test inside a dataframe +```python +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](https://docs.rs/rapidfuzz/latest/rapidfuzz/)) +```python +df2.select( + pl.col("word").str_ext.levenshtein("world", return_sim = True) +).head() +``` + +And a lot more! \ No newline at end of file diff --git a/docs/num_ext.md b/docs/num_ext.md new file mode 100644 index 00000000..34c78deb --- /dev/null +++ b/docs/num_ext.md @@ -0,0 +1,3 @@ +## Extension for General Numerical Features/Metrics/Quantities + +::: polars_ds.num_ext \ No newline at end of file diff --git a/docs/stats_ext.md b/docs/stats_ext.md new file mode 100644 index 00000000..12ffc235 --- /dev/null +++ b/docs/stats_ext.md @@ -0,0 +1,3 @@ +## Extension for Statistical Tests and Samples + +::: polars_ds.stats_ext \ No newline at end of file diff --git a/docs/str_ext.md b/docs/str_ext.md new file mode 100644 index 00000000..ad0d5af7 --- /dev/null +++ b/docs/str_ext.md @@ -0,0 +1,3 @@ +## Extension for String Manipulation and Metrics + +::: polars_ds.str_ext \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..a6485334 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,20 @@ +site_name: Polars-ds Docs + +nav: +- Home: index.md +- Complex Extension: complex_ext.md +- Numerical Extension: num_ext.md +- Stats Extension: stats_ext.md +- String Extension: str_ext.md + +theme: + name: material + +plugins: +- search +- mkdocstrings: + handlers: + python: + paths: [../python] + selection: + docstring_style: numpy \ No newline at end of file diff --git a/requirements-docs.txt b/requirements-docs.txt new file mode 100644 index 00000000..3bcef45c --- /dev/null +++ b/requirements-docs.txt @@ -0,0 +1,4 @@ +mkdocs +mkdocstrings[python] +mkdocs-material +pytkdocs[numpy-style] \ No newline at end of file diff --git a/site/404.html b/site/404.html new file mode 100644 index 00000000..67da7399 --- /dev/null +++ b/site/404.html @@ -0,0 +1,350 @@ + + + +
+ + + + + + + + + + + + + + +{"use strict";/*!
+ * escape-html
+ * Copyright(c) 2012-2013 TJ Holowaychuk
+ * Copyright(c) 2015 Andreas Lubbe
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
+ * MIT Licensed
+ */var Wa=/["'&<>]/;Vn.exports=Ua;function Ua(e){var t=""+e,r=Wa.exec(t);if(!r)return t;var o,n="",i=0,s=0;for(i=r.index;i