Coefficient of Variation (CV) and Coefficient of Quartile Variation (CQV) with Confidence Intervals (CI)
Project description
pycvcqv
Introduction
pycvcqv
provides some easy-to-use functions to calculate the
Coefficient of Variation (cv
) and Coefficient of Quartile Variation (cqv
)
with confidence intervals provided with all available methods.
Install
pip install pycvcqv
Usage
import pandas as pd
from pycvcqv import coefficient_of_variation, cqv
coefficient_of_variation(
data=[
0.2, 0.5, 1.1, 1.4, 1.8, 2.3, 2.5, 2.7, 3.5, 4.4,
4.6, 5.4, 5.4, 5.7, 5.8, 5.9, 6.0, 6.6, 7.1, 7.9
],
multiplier=100,
ndigits=2
)
# {'cv': 57.77, 'lower': 41.43, 'upper': 98.38}
cqv(
data=[0.2, 0.5, 1.1, 1.4, 1.8, 2.3, 2.5, 2.7, 3.5, 4.4, 4.6, 5.4, 5.4],
multiplier=100,
)
# 51.7241
data = pd.DataFrame(
{
"col-1": pd.Series([0.2, 0.5, 1.1, 1.4, 1.8, 2.3, 2.5, 2.7, 3.5]),
"col-2": pd.Series([5.4, 5.4, 5.7, 5.8, 5.9, 6.0, 6.6, 7.1, 7.9]),
}
)
coefficient_of_variation(data=data, num_threads=3)
# columns cv lower upper
# 0 col-1 0.6076 0.3770 1.6667
# 1 col-2 0.1359 0.0913 0.2651
cqv(data=data, num_threads=-1)
# columns cqv
# 0 col-1 0.3889
# 1 col-2 0.0732
Credits
This project was generated with python-package-template
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycvcqv-0.1.18.tar.gz
(13.4 kB
view details)
Built Distribution
pycvcqv-0.1.18-py3-none-any.whl
(19.6 kB
view details)
File details
Details for the file pycvcqv-0.1.18.tar.gz
.
File metadata
- Download URL: pycvcqv-0.1.18.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f82a99efb3887ac055bdf3351df32a34cdf9172d7c8ace9d5444917f44c2125b |
|
MD5 | 6e8b65dd2e6206738756e7dbca3c993a |
|
BLAKE2b-256 | 78550efb405dbd879805634a20c5227cf448d64a06c95842f6029632f6c67ed1 |
File details
Details for the file pycvcqv-0.1.18-py3-none-any.whl
.
File metadata
- Download URL: pycvcqv-0.1.18-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cdd416f1bcda11181512e16f4801b45a7f622cadaf2dfd3fcbffc4ac47d6581 |
|
MD5 | 2086bfe0970ac01cb39192f16ebb644f |
|
BLAKE2b-256 | fd4333ffb6fcd8227dae76c1449001e36aa42d7457da67764c2437104fbc32c8 |