Skip to main content

Allows the user to compare groups of data specified in a tidy pandas dataframe with ease.

Project description

Tests

Pairwise Compare

This tool allows the user to compare groups of data specified in a tidy pandas dataframe with ease. In this repo the capabilities of the PairwiseCompareManager are shown through examples using a dataset from the nf1_schwann_cell_painting_data. These examples can be found in the docs. Although, most of the development efforts can be found in the src folder. Users should almost exclusively interact with the PairwiseCompareManager, however, there may be rare exceptions. If you choose to interact with another component of the tool, then there will be less input validation safeguards available.

Installation

In Python 3.10 and 3.11 you can install this tool with:
pip install git+https://github.com/WayScience/pairwise_compare.git

Note it is highly recommended to use a package manager such as Conda to install this tool.
Once installed you can use subtools such as the PairwiseCompareManager with:
from comparison_tools.PairwiseCompareManager import PairwiseCompareManager

Data Formats

When passing arguments to the PairwiseCompareManager you can specify the columns that remain the same in each group-to-group comparison, and the columns that will be different in these comparisons. These columns are parameterized by _same_columns and _different_columns, respectively. The column values in these columns uniquely define each group. During pairwise comparisons of groups, all of the column values of the columns specified in _same_columns will be the same between both groups compared for all paired combinations of groups. Likewise, all of the column values of the columns specified in _different_columns will be different between both groups compared for all paired combinations of groups.

One of the following column arguments conditions must be satisified when using the PairwiseCompareManager:

  1. _same_columns must include at least one list element if _different_columns has less than two list elements.
  2. _different_columns must contain one or more list elements.
  3. _same_columns and _different_columns should not contain any of the same columns.

Limitations

  1. Input validation is enforced in the PairwiseCompareManager and PairwiseCompare classes.
  2. Additional column values are not tracked aside from columns used to compare groups (_same_columns, _different_columns).
  3. Output and input python data structures are limited.
  4. All of the data, in the supplied pandas dataframe, is used to compute comparisons.

Extensibility

This tool compares features between any two groups of a tidy pandas dataframe. To incorporate additional comparators for making comparisons, you must introduce the functionality as a class and inherit from the Comparator class (See Comparator.py for details).

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

pairwise_compare-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pairwise_compare-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pairwise_compare-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.12.10-76061203-generic

File hashes

Hashes for pairwise_compare-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2180c17bb2c114678a6491e28e44b626fb86f8682d300e41f83d5bb0f6aea88c
MD5 61ee1ac64062636a4dc67fbfc0a5acc4
BLAKE2b-256 b23b8fdc88550587d72782552e02258c4ff722bbbf65d8aad185ad0f39241cbd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pairwise_compare-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.10.12 Linux/6.12.10-76061203-generic

File hashes

Hashes for pairwise_compare-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80d055a7609b66d485ca33f82677f9cf1e7e3060f8fcc23a1efba2dc5397c911
MD5 6837cd0f6bf2dbb28322df7d890b8154
BLAKE2b-256 abbd62b5d3cfeaa4c3f477e04fa9dca941dabeff2ede90452348881b6ef7710e

See more details on using hashes here.

Supported by

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