PyCorr
A simple library to calculate correlation between variables. Currently provides correlation between nominal variables.
Based on statistical methodology like Cramer'V and Tschuprow'T allows to gauge the correlation between categorical variables. Ability to plot the correlation in form of heatmap is also provided.
Usage example
import pandas as pd
from pycorrcat.pycorrcat import plot_corr, corr_matrix
df = pd.DataFrame([('a', 'b'), ('a', 'd'), ('c', 'b'), ('e', 'd')],
columns=['dogs', 'cats'])
correlation_matrix = corr_matrix(data, ['dogs', 'cats'])
plot_corr(df, ['dogs','cats'] )
Development setup
Create a virtualenv and install dependencies:
pip install -r requirements.dev.txtpip install -r requirements.txtThen install the pre-commit hooks:pre-commit installand continue with code change.
Run pre-commit locally to check files
pre-commit run --all-files
Release History
- 0.1.4
- CHANGE: Changed the documentation (no code change)
- 0.1.3
- ADD: Ability to pass dataframe to get correlation matrix
- ADD: Ability to plot the correlation in form of heatmap
- 0.1.2
- Added as first release
- 0.1.1
- Test release
Author and Contributor
Anurag Kumar Mishra – Connect on github or drop a mail
Distributed under the GNU license. See LICENSE for more information.
Github repo link https://github.com/MavericksDS/pycorr
Contributing
- Fork it (https://github.com/MavericksDS/pycorr)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
Metadata
Release files for pycorr 0.1.5
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 |
|---|---|---|---|---|
| pycorr-0.1.5.tar.gz | 4.2 kB | Without provenance | Details for pycorr-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycorr-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for pycorr-0.1.5-py3-none-any.whl |
Total release size: 21.2 kB
Release files / pycorr-0.1.5.tar.gz
| Download URL | pycorr-0.1.5.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5e97d84e94bcd6c2d3a0c33865f23a1829b91c9ac0f92f3af12bf75783d722f
|
|
BLAKE2b-256 checksum How to use checksums |
48b1df097e13f48e41a268f938952b7ba41dce2a150a65d7284b6857c3c0c819
|
| 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/39.0.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.1
|
Release files / pycorr-0.1.5-py3-none-any.whl
| Download URL | pycorr-0.1.5-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79515681afb7d65d4396c2d95170fad96ef3dc9effbe3fa8aa432bccb0504f21
|
|
BLAKE2b-256 checksum How to use checksums |
14caaf5fb1b70a90e18e77c91c347ed72ffa7a255a0a911322be9ad800ae81bf
|
| 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/39.0.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.1
|
Security for pycorr 0.1.5
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.