Exploretransform
Explore and transform your datasets
Exploretransform is a collection of data exploration functions and custom pipline trasformers. It aims to streamline exploratory data analysis and extend some of scikit's data transformers.
Package Guide
Examples of using the exploretransform functions and classes are contained in examples.ipynb located on the github repository. Details about each function or class (docstrings) can be accessed using ?name
Installation
Python PYPI:
!pip install exploretransform
Import the exploretransform package:
import exploretransform as et
Summary of Functions and Classes
| Function / Class | Description |
|---|---|
| loadboston | loads the Boston housing dataset |
| peek | returns dtype, levels, # of observations, and first five observations for a dataframe |
| explore | provides various statistics on a dataframe (zeros, inf, missing, levels, dtypes) |
| nested | takes a list, series or dataframe and returns the location of nested objects |
| freq | for categorical or ordinal features, provides the count, percent, and cumulative percent for each level |
| plotfreq | generates a bar plot using the data generated by freq |
| corrtable | generates a table of all pairwise correlations and uses the average correlation for the row and column in to decide on potential drop/filter candidates |
| calcdrop | analyzes corrtable output determines which features should be filtered/drop |
| skewstats | returns the skewness statistics and magnitude for each numeric feature |
| ascores | calculates various association scores (kendall, pearson, mic, dcor, spearman) between predictors and target |
| ColumnSelect | custom transformer that selects columns for pipeline |
| CategoricalOtherLevel | custom transformer that creates "other" level in categorical / ordinal data based on threshold |
| CorrelationFilter | custom transformer that filters numeric features based on pairwise correlation |
How to use exploretransform
More examples of using the exploretransform functions and classes are contained in examples.ipynb. Details about each function or class (docstrings) can be accessed using ?
?et.explore
loadboston()
df, X, y = et.loadboston()
explore()
et.explore(X)
| variable | obs | q_zer | p_zer | q_na | p_na | q_inf | p_inf | dtype | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | town | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | object |
| 1 | lon | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 2 | lat | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 3 | crim | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 4 | zn | 506 | 372 | 73.52 | 0 | 0.0 | 0 | 0.0 | float64 |
| 5 | indus | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 6 | chas | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | category |
| 7 | nox | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 8 | rm | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 9 | age | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 10 | dis | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 11 | rad | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | category |
| 12 | tax | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | int64 |
| 13 | ptratio | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 14 | b | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| 15 | lstat | 506 | 0 | 0.00 | 0 | 0.0 | 0 | 0.0 | float64 |
| Column | Description |
|---|---|
| variable | name of variable |
| obs | number of observations |
| q_zer | number of zeros |
| p_zer | percentage of zeros |
| q_na | number of missing |
| p_na | percentage of missing |
| q_inf | number of infinity |
| p_inf | percentage of infinity |
| dtype | Python dtype |
Release History
- 1.0.0
- First release
- 1.0.1 - 1.0.7
- Minor adjustments to get package working correctly
Meta
Brian Pietracatella – bpietrac@gmail.com
Distributed under the MIT license. See LICENSE for more information.
Metadata
Release files for exploretransform 1.0.7
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 |
|---|---|---|---|---|
| exploretransform-1.0.7.tar.gz | 12.6 kB | Without provenance | Details for exploretransform-1.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| exploretransform-1.0.7-py3-none-any.whl | Python 3 | none | any | Details for exploretransform-1.0.7-py3-none-any.whl |
Total release size: 24.3 kB
Release files / exploretransform-1.0.7.tar.gz
| Download URL | exploretransform-1.0.7.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b44d53d4620f1c7c6bd96790d12704f023be647fd96ce5f7af4ae4522f83ccff
|
|
BLAKE2b-256 checksum How to use checksums |
857829e85a35ef875e9d1b277e240e9a00597d8ac5f655d43d9cc49e0a68b493
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Release files / exploretransform-1.0.7-py3-none-any.whl
| Download URL | exploretransform-1.0.7-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32c3e7aa73c802efca7152db78a48438f733809da92c7e53183b7389d5844580
|
|
BLAKE2b-256 checksum How to use checksums |
9391be8914c651fe7268fb5bc91ea2910d98d7d17d1035b4c94059abc632d1d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Security for exploretransform 1.0.7
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.