LigonLibrary
A Python utility library for working with DataFrames, Google Sheets, fuzzy string matching, and more.
Installation
From PyPI:
pip install ligonlibrary
Or pin in your project's dependencies (e.g. in pyproject.toml):
dependencies = [
"ligonlibrary>=0.2.1",
]
To install the development version straight from GitHub:
pip install git+https://github.com/ligon/LigonLibrary.git
Requires Python 3.11+.
What's included
DataFrame utilities
get_dataframe(f)— Read a DataFrame from nearly any file: CSV, Excel, Parquet, Feather, Stata (.dta), SPSS, fixed-width, org-tables, and GPG-encrypted variants of all of the above.df_to_orgtbl(df)— Render a DataFrame as an Emacs org-mode table, with optional standard errors, confidence intervals, and significance stars.orgtbl_to_df(table)— Parse an org-mode table back into a DataFrame.df_from_orgfile(path)— Read named tables from.orgfiles.from_dta(fn)— Read Stata.dtafiles with automatic label decoding.normalize_strings(df, ...)— Normalize string columns in a DataFrame.find_similar_pairs(s1, s2)— Find fuzzy-matching pairs between two Series.
Google Sheets
read_sheets(key, ...)/read_public_sheet(key)— Read a Google Sheet into a DataFrame.write_sheet(df, key, ...)— Write a DataFrame to a Google Sheet.delete_sheet(key)— Delete a Google Sheet.get_credentials(...)— Load Google service-account credentials (supports GPG-encrypted JSON).
String matching
normalized(s)— Normalize a string (case, whitespace, hyphens).similar(a, b)— Check whether two strings are fuzzy-similar.most_similar(s, candidates)— Find the best fuzzy match from a list.
Other
email_from_ligon(...)— Send email via the Gmail API.get_password_for_machine(host)— Look up a password in a GPG-encrypted~/.authinfo.gpgfile, with fallback topass(password-store).
License
BSD 3-Clause. See LICENSE.
Metadata
Release files for ligonlibrary 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ligonlibrary-0.2.3.tar.gz | 21.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ligonlibrary-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.6 kB
Release files / ligonlibrary-0.2.3.tar.gz
| Download URL | ligonlibrary-0.2.3.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2484b028e6da1f8fb582d67e653f89cd701f560addc90a08fd9b7e5365eff3ca
|
|
BLAKE2b-256 checksum How to use checksums |
0f0a91bc2aa5bb4436c9ecb0f87e8242c6f389d036c0339481c6f1a2afa3d8d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.12 Linux/6.6.135-09383-g1140e4f27e24
|
Release files / ligonlibrary-0.2.3-py3-none-any.whl
| Download URL | ligonlibrary-0.2.3-py3-none-any.whl |
|---|---|
| Size | 21.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3baa06b4f695ab5b519390014414da12ad8d75c7f01be8c90da15e6c392ddfc
|
|
BLAKE2b-256 checksum How to use checksums |
d0ab17e3a316d3bdcd59df53154e7370ffedd782a5d2775b3d03698aab25f633
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.12 Linux/6.6.135-09383-g1140e4f27e24
|