Skip to main content
INSTALLATION

    $ pip3 install venncsv

HELP

    $ venncsv -h

USAGE

    $ venncsv [-h] [-V] [-v] [-y] [-n] [-o] [-q] [-A] [-O] [-X] [-M] [-W]

               x_csv y_csv

'$ venncsv x.csv y.csv' writes x_and_y.csv x_or_y.csv x_xor_y.csv x_minus_y.csv and y_minus_y.csv

Let's have two CSV files, say x.csv and y.csv. Each file contains a header plus zero or more rows.

File extensions must be underscore '.csv'. The two headers must be strictly equal.

Rows in input files are intended as two sets of strings, say x and y. No field splitting is done.

If we issue:

    $ venncsv -AOXMW x.csv y.csv

or simply:

    $ venncsv x.csv y.csv

then we generate five files, as follows:

    x_and_y.csv   = x & y, the intersection of x and y, the rows both in x and y
    x_or_y.csv    = x | y, the union of x and y, the rows in x or y or both
    x_xor_y.csv   = x ^ y, the exclusive union of x and y, the rows in x or y but not in both
    x_minus_y.csv = x - y, the difference between x and y, the rows in x but not in y
    y_minus_x.csv = y - x, the difference between y and x, the rows in y but not in x

                   ┌───────────┐
                   │ x - y     │
                 x │   ┌───────┼───┐
                   │   │ x & y │   │
                   └───┼───────┘   │ y
                       │     y - x │
                       └───────────┘

Sets x - y, x & y and y - x are the three wedges of the Venn diagram of sets x and y, and hence
the 'venncsv' name.

Output files can be selected by -A -O -X -M and -W flags, but if no such flag is given then all
five output files are written.

Trailing blanks in header and rows are stripped. Empty rows and duplicated rows are skipped.

Rows in output files are alphabetically sorted.

Input files can be prefixed by a path, but output files are always written in current directory.

Example:

    $ cat one.csv
    N
    4
    3
    2
    1
    $ cat two.csv
    N
    6
    5
    4
    3
    $ venncsv -vy one.csv two.csv
    4 rows <-- '/home/xxxx/one.csv'
    4 rows <-- '/home/xxxx/two.csv'
    2 rows --> '/home/xxxx/one_and_two.csv'
    6 rows --> '/home/xxxx/one_or_two.csv'
    4 rows --> '/home/xxxx/one_xor_two.csv'
    2 rows --> '/home/xxxx/one_minus_two.csv'
    2 rows --> '/home/xxxx/two_minus_one.csv'
    Open 2 input files and 5 output files for check and print or Quit? (o=open, q=quit) --> q
    $

POSITIONAL ARGUMENTS

  x_csv            1st input file
  y_csv            2nd input file

OPTIONAL ARGUMENTS

  -h, --help       show this help message and exit
  -V, --version    show program's version number and exit
  -v, --verbose    show what happens
  -y, --yes        overwrite existing output files (default: ask)
  -n, --no         don't overwrite existing output files (default: ask)
  -o, --open       at end open input and output files for check and print
                   (default: ask)
  -q, --quit       at end don't open input and output files for check and
                   print (default: ask)
  -A, --x-and-y    write x_and_y.csv = x.csv & y.csv
  -O, --x-or-y     write x_or_y.csv = x.csv | y.csv
  -X, --x-xor-y    write x_xor_y.csv = x.csv ^ y.csv
  -M, --x-minus-y  write x_minus_y.csv = x.csv - y.csv
  -W, --y-minus-x  write y_minus_x.csv = y.csv - x.csv

Metadata

Release files for venncsv 0.9.3

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

Source distribution (sdist)

Source distribution for venncsv 0.9.3
File Size Uploaded Provenance
venncsv-0.9.3.tar.gz 3.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for venncsv 0.9.3
File Interpreter ABI Platform
venncsv-0.9.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / venncsv-0.9.3.tar.gz

Download URL venncsv-0.9.3.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
eb7152668b1296f58da3622ea4842676f706b1f3e354686bdcfcf9ce419b0309
BLAKE2b-256 checksum
How to use checksums
06c042f31acbd5dc36efe111c5e92b958ff504ce8b2672a483e1ef4b2582d46c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / venncsv-0.9.3-py3-none-any.whl

Download URL venncsv-0.9.3-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8821bdf5ebb7618df23df7a497fd43ce0eb87ff7159cd0e8cd4294cb7a5f3359
BLAKE2b-256 checksum
How to use checksums
600ddb241c97605eb9f414c9ca43201fc8fb92165259140c9e3c9039c09a6284
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Security for venncsv 0.9.3

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.

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