Skip to main content

xlsx2dfs

Easy loading from and writing to excel sheets to/from pandas DataFrames (and list of sheet_names).

Installation

pip install xlsx2dfs

Usage

from xlsx2dfs import xlsx2dfs, withNames, dfs2xlsx

# xlsx file path
fpath = "test.xlsx"

# read from it:
dfs, sheet_names = xlsx2dfs(fpath)

# write to it 
out_fpath = "out_test.xlsx"
dfs2xlsx(dfs, sheet_names=["sheet1", "sheet2", "sheet3"], out_fpath=out_fpath)

# or using `withNames` which allows alternate input of sheet_name and corresponding df
# `withNames("sheet1", dfs[0], "sheet2" dfs[1], "sheet3", dfs[2])` returns
# ([dfs[0], dfs[1], dfs[2]], ["sheet1", "sheet2", "sheet3"])
# thus (dfs, sheet_names). Using asterisk we can integrate them into the argument list
# of `dfs2xlsx`.
dfs2xlsx(*withNames("sheet1", dfs[0], "sheet2" dfs[1], "sheet3", dfs[2]), out_fpath)
# This makes especially sense when you have different data frames as results in your script
# and you want to save few lines of code which would be needed to bind them
# together into a list and name them.
# Instead, you can do the naming and binding to a list using `*withNames().
# This also enhances readability and is intuitive.
# e.g.
dfs2xlsx(*withNames("Temperatures", temperatures_df,
                    "Prediction", prediction_df,
                    "Original Data", orig_df), 
         "/path/to/output/file.xlsx")

document the version:

  • Linux: $ pip freeze | grep xlsx2dfs
  • Windows: c:\> pip freeze | findstr xlsx2dfs

Metadata

Release files for xlsx2dfs 0.1.0.post6

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

Source distribution (sdist)

Source distribution for xlsx2dfs 0.1.0.post6
File Size Uploaded Provenance Actions
xlsx2dfs-0.1.0.post6.tar.gz 2.9 kB Without provenance Details for xlsx2dfs-0.1.0.post6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xlsx2dfs 0.1.0.post6
File Interpreter ABI Platform Actions
xlsx2dfs-0.1.0.post6-py3-none-any.whl Python 3 none any Details for xlsx2dfs-0.1.0.post6-py3-none-any.whl

Total release size: 5.7 kB

Release files / xlsx2dfs-0.1.0.post6.tar.gz

Download URL xlsx2dfs-0.1.0.post6.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ab4c5b71039a360fad51c8c2ff9b37a8807792a731c28e0a87d2fbd6f685967c
BLAKE2b-256 checksum
How to use checksums
bfb687a2d7b6148d05f10d40f544ef794c62629581afd690d5c9d6938cc43418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.8.6 Linux/5.4.0-71-generic

Release files / xlsx2dfs-0.1.0.post6-py3-none-any.whl

Download URL xlsx2dfs-0.1.0.post6-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3035cf1f3877f3a01d2d3d0a4d0b2ed2a70c01a145973bae7f380c81edac67c7
BLAKE2b-256 checksum
How to use checksums
335fa6055b53043452fa962caf6249bd08d4516a5d892c89767127b499e13396
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.8.6 Linux/5.4.0-71-generic

Security for xlsx2dfs 0.1.0.post6

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