Skip to main content

Merge two CSV files with pandas

Project description

Merge CSV

Simple package for merging two CSV files with pandas based on values in a given column.

This module is required over pd.merge due to proper handling of rows with empty values.

Install

pip install merge_csv_xjg

Usage

As CLI Tool

Usage: merge_csv [OPTIONS]

Options:
  -l, --left-file TEXT            One of two CSVs to be merged
  -r, --right-file TEXT           Two of two CSVs to be merged
  -c, --column TEXT               Name of column to match entries
  -o, --output TEXT               Output file path
  -k, --keep [left|right|both|none]
                                  Table to keep values from if no match is
                                  found
  --keep-missing [left|right|both|none]
                                  Keep rows where value in named column is
                                  null
  -v, --verbose                   Output extra information
  --help                          Show this message and exit.

TODO

  • Only copy specific columns from each of the sheets

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

merge_csv_xjg-0.0.6.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

merge_csv_xjg-0.0.6-py3-none-any.whl (7.1 kB view hashes)

Uploaded Python 3

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