Skip to main content

A package to perform an advanced version of pandas' value_counts()

Project description

Welcome to advanced-value-counts

advanced-value-counts is a Python-package containing the AdvancedValueCounts class that makes use of pandas' .value_counts(), .groupby() and seaborn to easily get a lot of info about the counts of a (categorical) column in a pandas DataFrame. The potential of this package is at its peak when wanting info of counts of a column after a grouping: df.groupby(groupby_col)[column].value_counts(). Click here to read how to use AdvancedValueCounts. Read this medium article or consult this notebook for an explanation on the added value of this package.

Git repository.

Table of contents:

Installation for users using PyPi

pip install advanced-value-counts

If errors surface please upgrade pip and setuptools

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools

Installation for users without PyPi

git clone https://github.com/sTomerG/advanced-value-counts.git
cd advanced-value-counts
pip install -e .
# optional but potentially crucial
pip install -r requirements/requirements.txt

To test whether the installation was succesfull run in the advanced-value-counts directory (DeprecationWarnings are expected)

pytest

Usage

Please consult here.

Installation for contributors

git clone https://github.com/sTomerG/advanced-value-counts.git
cd advanced-value-counts
python3 -m venv .venv

Activate the virtual environment

Windows:

.\.venv\Scripts\activate

Linux / MacOS:

source .venv/bin/activate

Install requirements

python -m pip install --upgrade pip
pip install -r requirements/requirements.txt

Test if everything works properly

(DeprecationWarnings are expected)

With tox

tox

Without tox

pip install -e .
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

advanced-value-counts-1.0.0.tar.gz (14.9 kB view hashes)

Uploaded Source

Built Distribution

advanced_value_counts-1.0.0-py3-none-any.whl (10.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page