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/Scripts/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-0.1.0.tar.gz (81.4 kB view details)

Uploaded Source

Built Distribution

advanced_value_counts-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file advanced_value_counts-0.1.0.tar.gz.

File metadata

  • Download URL: advanced_value_counts-0.1.0.tar.gz
  • Upload date:
  • Size: 81.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for advanced_value_counts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 552c148521fdb602672b741935a58e6dcf3eda3d3802b066276c45e71da16c99
MD5 4ef017bb087edfd53142bfe083070ca1
BLAKE2b-256 d984b6f461fdc305848b4dde500f3ddf824a02f7371bb26119a984ab55eb57ba

See more details on using hashes here.

File details

Details for the file advanced_value_counts-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for advanced_value_counts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91cb3387c5d4bab6f2e466b4ef6515b9b4341773cccaa952c22bc4d1a4591f30
MD5 3184604b221c003fa0a97dcee728a7f3
BLAKE2b-256 65a7be4c66ee0bf869c73d0e8ff2c476a07f650c522aac6d702765fb1a72ae60

See more details on using hashes here.

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