Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pysheetreader

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pysheetreader

A blazingly fast spreadsheet parser for .xlsx files

  • 0.0.1
  • PyPI
  • Socket score

Maintainers
1

SheetReader Python Bindings

SheetReader allows to read your Excel spreadsheet files (.xlsx) blazingly fast. This repository contains the Python bindings, as the core library is implemented in C++.

Quickstart

Sheetreader is available through:

pip install pysheetreader

After successful installation, spreadsheets can be loaded:

import pysheetreader as sr
sheet = sr.read_xlsx("my_favorite_sheet.xlsx")

To convert a spreadsheet into a pandas Dataframe:

import pysheetreader as sr
import pandas as pd
sheet = sr.read_xlsx("my_favorite_sheet.xlsx")
df = pd.DataFrame.from_dict(sheet[0])

Parameters:

ParameterTypeDescriptionDefault
pathstringThe path of the .xlsx file to parse.-
sheetinteger or stringThe sheet of the file to parse, can be either the index (starting at 1) or the name.1
headersbooleanWhether to interpret the first parsed row as headers.True
skip_rowsintegerHow many rows to skip before parsing data.0
skip_columnsintegerHow many columns to skip before parsing data.0
num_threadsintegerHow many threads to use for parsing. Use -1 for automatic threading.-1
col_typesdict or listHow to interpret parsed data, either by names (dict) or by position (list). Types: numeric, text, logical, date, skip, guess.None

Build Instructions

First install the submodules, which contain the sheetreader-core dependency with:

git clone --recurse-submodules https://github.com/polydbms/sheetreader-python.git

To build from source, this repository provides a pyproject.toml. The SheetReader wheel file can be generated through:

python -m build .

or installed with pip through:

pip install .

More resources

SheetReader is part of the PolyDB Project. We also provide bindings/extensions for several other environments:

  • R language: Load spreadsheets into dataframes, also available via CRAN.
  • PostgreSQL FDW: Foreign data wrapper for PostgreSQL; allows to register spreadsheets as foreign tables.
  • DuckDB Extension: Extension for DuckDB that allows loading spreadsheets into tables. Also available as a community extension.

Paper

SheetReader was published in the Information Systems Journal. Cite as:

@article{DBLP:journals/is/GavriilidisHZM23,
  author       = {Haralampos Gavriilidis and
                  Felix Henze and
                  Eleni Tzirita Zacharatou and
                  Volker Markl},
  title        = {SheetReader: Efficient Specialized Spreadsheet Parsing},
  journal      = {Inf. Syst.},
  volume       = {115},
  pages        = {102183},
  year         = {2023},
  url          = {https://doi.org/10.1016/j.is.2023.102183},
  doi          = {10.1016/J.IS.2023.102183},
  timestamp    = {Mon, 26 Jun 2023 20:54:32 +0200},
  biburl       = {https://dblp.org/rec/journals/is/GavriilidisHZM23.bib},
  bibsource    = {dblp computer science bibliography, https://dblp.org}
}

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc