Skip to main content

# TableReader

TableReader is an unified abstraction for handling xls, xlsx and CSV files in Python. It also reads csv tables as unicode on request.

If you are familiar with csv.DictReader from the standard library, think of TableReader as DictReader on steroids.

from tablereader import TableReader

reader = TableReader("some_input.xlsx", sheet="The Data")
for row in reader:
    print row['valuecolumn']

In case you have csv and need unicode support:

reader = TableReader("unicode_input.csv", force_type="unicodecsv")
for row in reader:
    print row['valuecolumn']

If you want to strip out leading and trailing spaces while reading rows, you can:

reader = TableReader("input_with_whitespaces.csv", strip_whitespaces=True)
for row in reader:
    print row['valuecolumn']

And if for some reason you have a file with wrong type by line-ending (commonly found when sharing xls), override auto-detection:

reader = TableReader("wrong_named.xls", force_type="xlsx")
for row in reader:
    print row['valuecolumn']

Sometimes headers are not in the first line. So specify some header row search text and the entire row will be used as column name and all rows after are returned:

from tablereader import OffsetTableReader

reader = OffsetTableReader("wrong_named.xls", "BEGIN_DATA")
for row in reader:
    print row['valuecolumn']

The library has been tested on CPython 2.6, 2.7 and 3.4 as well as PyPy 2.4.1.

Release files for tablereader 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tablereader 1.0.1
File Size Uploaded Provenance Actions
tablereader-1.0.1.tar.gz 10.3 kB Without provenance Details for tablereader-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tablereader 1.0.1
File Interpreter ABI Platform Actions
tablereader-1.0.1.macosx-10.11-intel.tar.gz Details for tablereader-1.0.1.macosx-10.11-intel.tar.gz

Total release size: 19.1 kB

Release files / tablereader-1.0.1.tar.gz

Download URL tablereader-1.0.1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0c92d5ea2334e29112adfa14ae15447cf7bc2ed5e7157a9e25c83c13cac9c053
BLAKE2b-256 checksum
How to use checksums
0b879085cffa5b51bdab10cef68a6d0afb9d02407e28fb9ee255ad7aba61d16a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tablereader-1.0.1.macosx-10.11-intel.tar.gz

Download URL tablereader-1.0.1.macosx-10.11-intel.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4aeb069125c9540521854bfd684c848762e6c776f43d65ce91cd0282091a3b2c
BLAKE2b-256 checksum
How to use checksums
29fabf880d58a6df2ad6bc7e20807f14926283a64de7db8899be9d3db005008f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tablereader 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page