Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swapnalshahil/csv_intersection
csv_intersection is basically a PyPI Package to get common rows from two tsv/csv files.
https://github.com/swapnalshahil/csv_intersection
csv csv-intersection package pypi python tsv tsv-intersection
Last synced: 10 days ago
JSON representation
csv_intersection is basically a PyPI Package to get common rows from two tsv/csv files.
- Host: GitHub
- URL: https://github.com/swapnalshahil/csv_intersection
- Owner: swapnalshahil
- License: mit
- Created: 2021-08-09T07:41:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-02T13:50:41.000Z (over 2 years ago)
- Last Synced: 2024-12-10T11:36:19.231Z (about 1 month ago)
- Topics: csv, csv-intersection, package, pypi, python, tsv, tsv-intersection
- Language: Jupyter Notebook
- Homepage: https://pypi.org/project/csv-intersection/
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# csv_intersection
## Introduction
csv_intersection is basically a PyPI Package to get common rows from two tsv/csv files. Many a time we need common data from two tsv/csv files so using csv_intersection package will prolly solve this problem.This package currently have one function `csv_intersection` which returns common rows between two csv/tsv in list of OrderedDict.
Default delimiter is `","` and default encoding is `"UTF-8"`
## Function
```csv_intersection(path_of_tsv1, path_of_tsv2, delimiter, encoding)```
## Table of contents
* [Setup](#setup)
* [Usage](#usage)
* [Dependencies](#dependencies)
* [Contacts](#contacts)## Setup
```pip install csv-intersection```
## Usage
```
from csv_intersection import csv_intersectioncommon_rows = csv_intersection(tsv1, tsv2)
# if delimiter is other than ","
common_rows = csv_intersection(tsv1,tsv2,delimiter = delimiter_of_file)# if encoding is different other than UTF-8
common_rows = csv_intersection(tsv1, tsv2, encoding = encoding_of_file)```
## Dependencies
It requires csv module only which is a built-in module in Python.## Contacts
* [Author](https://swapnalshahil.github.io/)
* [Github](https://github.com/swapnalshahil)
* [Linkedin](https://www.linkedin.com/in/swapnalshahil/)
* [Twitter](https://twitter.com/eulersgamma)