Skip to main content

# Informative Comparison of DataFrame Differences

This is a tool that is used to compare and test Pandas DataFrames. It has three parts.

### Core function At it’s core is a function that compares a number of aspects of two dataframes.

  1. Number of rows

  2. Column names

  3. dtypes

  4. Index

  5. Integers

  6. Floats

  7. Datetimes

  8. Objects (typically strings)

  9. NaNs

  10. Booleans

For each dimension, if differences are found, a key is included in the diffs dictionary that is returned. The value of that key (e.g. ‘nrows’) would be a string description (e.g. ‘observed contains 5 rows. expected 10.)

### PyTest Integration

If one is testing functionality that produces a dataframe, and one can create one to compare it to…

pytest_kit.py automatically injects N separate pytests into a test module (test_<name>.py) simply by doing the following 2 things.

  1. Create two pytest fixtures: df_observed, and df_expected

  2. Adding the import statement from df_compare.pytest_kit import *

That’s it, when you run $ pytest test_<name>.py, it will discover and run N separate tests!

### Shell script

This comparison can be used to compare two files, or even a directory of files containing tables.

###### Details to be added

[![Build Status](https://travis-ci.org/caseyclements/pennies.svg?branch=master)](https://travis-ci.org/caseyclements/pennies)

Metadata

Release files for df-compare 0.0.1

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

Source distribution (sdist)

Source distribution for df-compare 0.0.1
File Size Uploaded Provenance
df_compare-0.0.1.tar.gz 8.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for df-compare 0.0.1
File Interpreter ABI Platform
df_compare-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.0 kB

Release files / df_compare-0.0.1.tar.gz

Download URL df_compare-0.0.1.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
527f8a72bba7a8767aa7c63f4d8a74b4936ed702bc0b5f4205f2bf858d6a1158
BLAKE2b-256 checksum
How to use checksums
f5026f3b3a31fa7995ffe371742b803220ee4d6a1c73f9fad4478c9ef07183a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Release files / df_compare-0.0.1-py3-none-any.whl

Download URL df_compare-0.0.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90b22618d81196eb2a9bdd27336a881dd56e79fd8d78f4e802d26f45ec800a8a
BLAKE2b-256 checksum
How to use checksums
37d46de84980a02d19595c5817bba0900c76fdd1039b5c22bdcd9cf53f1ee0c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

Security for df-compare 0.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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