Skip to main content

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

You can install this tool with either of the following commands:
pip install pairwise-compare
uv add pairwise-compare

Once installed you can use subtools such as the PairwiseCompareManager with:
from pairwise_compare.comparison_tools.PairwiseCompareManager import PairwiseCompareManager
and a comparator with, for example:
from pairwise_compare.comparators.PearsonsCorrelation import PearsonsCorrelation

Development

See CONTRIBUTING.md for how to run the tests and make a release.

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).

Metadata

Release files for pairwise-compare 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pairwise-compare 0.2.0
File Size Uploaded Provenance Actions
pairwise_compare-0.2.0.tar.gz 941.7 kB With provenance Details for pairwise_compare-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pairwise-compare 0.2.0
File Interpreter ABI Platform Actions
pairwise_compare-0.2.0-py3-none-any.whl Python 3 none any Details for pairwise_compare-0.2.0-py3-none-any.whl

Total release size: 951.6 kB

Release files / pairwise_compare-0.2.0.tar.gz

Download URL pairwise_compare-0.2.0.tar.gz
Size 941.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b44620ca0e86b139448b27f167fc4ea8249ceb1d87e722b52497bd99b730e345
BLAKE2b-256 checksum
How to use checksums
fd097a2464677288535956f999b1cce06ef56c4ec82e7c3459da2a518580b192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / pairwise_compare-0.2.0-py3-none-any.whl

Download URL pairwise_compare-0.2.0-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
adc5899dea1182c1a3de0cdc074297146236520229604c9790257555ac4406eb
BLAKE2b-256 checksum
How to use checksums
62e58644bf06afaa77106cdb9b9455403090f99afc871aba271e4b4dae051920
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for pairwise-compare 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pairwise_compare-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page