Pandas Bootstrap
Statistical Bootstrap with Pandas made easy.
Installation
pip install pandas-bootstrap
Usage
The module is very easy to use.
import bootstrap- define statistic function:
def some_func(df: pd.DataFrame | pd.Series): - get bootstrapped samples:
df.boot.get_samples(bfunc=some_func, B=100)
Below is a simple example of bootstrapping the mean of two columns.
import pandas as pd
import bootstrap
df = pd.DataFrame({
'a': [1, 2, 3, 4, 5],
'b': [6, 7, 8, 9, 10],
})
def mean_of_columns(df):
return df.mean(numeric_only=True)
sample_kwargs = dict(random_state=42)
df_bootstrap = df.boot.get_samples(bfunc=mean_of_columns, B=5, sample_kwargs=sample_kwargs)
which results in:
a b
sample
0 3.0 8.0
1 2.6 7.6
2 4.0 9.0
3 3.2 8.2
4 3.0 8.0
Documentation
Read more in the documentation
Metadata
Release files for pandas-bootstrap 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pandas_bootstrap-0.3.0.tar.gz | 7.4 kB | Without provenance | Details for pandas_bootstrap-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pandas_bootstrap-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pandas_bootstrap-0.3.0-py3-none-any.whl |
Total release size: 14.9 kB
Release files / pandas_bootstrap-0.3.0.tar.gz
| Download URL | pandas_bootstrap-0.3.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c11e5c0df8bf2ba2c051fda0e036356a0dd54712b9905ce931b5d4399a36db3
|
|
BLAKE2b-256 checksum How to use checksums |
3ce6a82d8368d09c04967d21b1a36c2298c9d6ce70d1341b05cadb98f1965476
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.6.14
|
Release files / pandas_bootstrap-0.3.0-py3-none-any.whl
| Download URL | pandas_bootstrap-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98b25dec1f891869cccf557fe2411e4c29bd961a91eef884d6c5e5a60fc3e1ad
|
|
BLAKE2b-256 checksum How to use checksums |
2a699b81bea0fd33c28e47ec2d8dd944d66a3f0b0a12cfdfabc4b889a8ca1b8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.6.14
|
Security for pandas-bootstrap 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.