A keyword search for CSV/Excel/Pandas
Project description
Keyword Search
A keyword search package for CSV/Excel/Pandas using boolean expressions.
-
It works by processing a query string with field indicator for Pandas Dataframe columns.
-
Currently, only
.str.containsqueries are performed. -
Boolean operations (
and,or,and not) are mantained during compilation, following Pandas sintax. -
All further work is done by the Pandas
DataFrame.querymethod.
Searched field should not contain spaces or :.
Examples:
((title:leptospira) and (abstract:vaccine))
Installation
$ pip install keyword-search
Using as a Python package
from keyword_search.query import keyword_search
df_results = keyword_search(df, "(title:Leptospirosis)")
print(df_results)
Using as a CLI application
$ keyword-query papers.csv "(title:leptospira) or (abstract:leptospira)" --delimiter ";" --output results.csv
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keyword_search-0.0.2-py3-none-any.whl.
File metadata
- Download URL: keyword_search-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b52754844c24f949d0519538339b228d245751930e154cacf5eb8e37eeea2fc
|
|
| MD5 |
81ee973c595aa0080c337bcae34da229
|
|
| BLAKE2b-256 |
e4eaa21ac222b14ec7621395447d83066b929152d60aacf02f8088317b080ac7
|