dataframe_image
A package to convert Jupyter Notebooks to either pdf or markdown documents embedding pandas DataFrames as images instead of their default format.
When converting Jupyter Notebooks to pdf using nbconvert, pandas DataFrames appear as either raw text or as a simple latex table. When converting to markdown The DataFrame's appearance while running a Jupyter Notebook is much different. Below, we have a pdf showing both the plain text and latex DataFrame representation.
This package was created to embed DataFrames into pdf and markdown documents as images so that they appear exactly as they do in a Jupyter Notebook. Here, the same DataFrame as above is show in a pdf converted using dataframe_image.
Installation
pip install dataframe_image
Usage
In a separate Python script, import the dataframe_image package and pass the file name of your notebook to the convert function.
>>> import dataframe_image as dfi
>>> dfi.convert('path/to/your_notebook.ipynb',
to='pdf',
max_rows=30,
max_cols=10,
ss_width=1000,
ss_height=900,
resize=1,
chrome_path=None,
limit=None
)
Dependencies
You must have the following python libraries installed
You must also have Google Chrome installed.
Metadata
Release files for dataframe-image 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dataframe_image-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Release files / dataframe_image-0.0.3-py3-none-any.whl
| Download URL | dataframe_image-0.0.3-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d40528d9f82824a6905fbb3ae06dcac835ab4e300fd92ab375c367e1273efea
|
|
BLAKE2b-256 checksum How to use checksums |
1d4d400d231119cdc657d0ca2f65d536ed7cc26d6378879e98ff167cb92a9749
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
|