Skip to main content

Read tables from messy spreadsheets.

Project description

Documentation Status

Overview

fuzzytable is a set of tools for extracting tabular data out of messy spreadsheets.

This library was developed to meet the needs of projects relying on spreadsheet data that has been handled by many people. Headers are often missing or mispelled. The data is incorrectly formatted. The table is on the wrong worksheet or you don't know the correct spreadsheet name. Etc...

fuzzytable allows you to quickly extract that data instead of arduously QC'ing the data ahead of time. After extraction, you can query the FuzzyTable attributes to e.g. determine which fields were found and how closely the desired header matches the actual header.

Features

  • Seek specific fields or extract them all.
  • Find the best-fit table from a specific sheet or anywhere in the spreadsheet.
  • Set the header row or have fuzzytable find it.
  • Normalize the data - either for the entire table or per field. (to be implemented...)
  • Allow exact or approximate header matches.
  • Enable or suppress exceptions for missing fields.

Documentation

Supported Formats

  • Excel (.xlsx, .xlsm, .xltx, .xltm)
  • csv (.csv)

Basically, anything that can be read by the openpyxl or csv modules.

Installation

# terminal
pip install fuzzytable

Example Usage

# python

from fuzzytable import FuzzyTable

path = 'path/to/excel/sheet.xlsx'
sheetname = 'worksheet name'
fields = ['first_name', 'last_name', 'birthday']
ft = FuzzyTable(
    path=path,
    sheetname=sheetname,
    fields=fields
)

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

fuzzytable-0.8a0.tar.gz (54.9 kB view details)

Uploaded Source

Built Distribution

fuzzytable-0.8a0-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

File details

Details for the file fuzzytable-0.8a0.tar.gz.

File metadata

  • Download URL: fuzzytable-0.8a0.tar.gz
  • Upload date:
  • Size: 54.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for fuzzytable-0.8a0.tar.gz
Algorithm Hash digest
SHA256 10d1b9c9468c13d570527d54730f4ce95d186fb1fe470447c137b283d8a8f1fb
MD5 ec1ec1c6326c2dea12344f02a343fc33
BLAKE2b-256 4febba7bbbb4c3dc335bcddbe20721493ca9136d610c986217d2dd6e709eecda

See more details on using hashes here.

File details

Details for the file fuzzytable-0.8a0-py3-none-any.whl.

File metadata

  • Download URL: fuzzytable-0.8a0-py3-none-any.whl
  • Upload date:
  • Size: 49.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.22.0

File hashes

Hashes for fuzzytable-0.8a0-py3-none-any.whl
Algorithm Hash digest
SHA256 f14ee0a5300e71b9e88c65cd62cf8f9f2e161a79aa83bc4f370d1012fa92a7e6
MD5 90946ae8506b01398e113b18108e280a
BLAKE2b-256 e28d39c9f8e940bb962e5c02787de0e26bce93466ff1f960fbcd3339d84b8689

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page