Skip to main content

Embed pandas DataFrames as images in pdf and markdown files when converting from Jupyter Notebooks

Project description

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.

png

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.

png

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.

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

dataframe_image-0.0.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dataframe_image-0.0.2-py3.7.egg (15.6 kB view details)

Uploaded Egg

dataframe_image-0.0.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file dataframe_image-0.0.2.tar.gz.

File metadata

  • Download URL: dataframe_image-0.0.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for dataframe_image-0.0.2.tar.gz
Algorithm Hash digest
SHA256 160c19590a653e4a6ec615ddadeaf1899b253dd502b316cad11b0c9fd5a64816
MD5 7194c8a89c66e870af1b829bafbf8d47
BLAKE2b-256 6d2f9d7bd12798e01f4abf36b38d536eab61845d7b21aec8d378b3f91a8d44d0

See more details on using hashes here.

File details

Details for the file dataframe_image-0.0.2-py3.7.egg.

File metadata

  • Download URL: dataframe_image-0.0.2-py3.7.egg
  • Upload date:
  • Size: 15.6 kB
  • Tags: Egg
  • Uploaded using 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

File hashes

Hashes for dataframe_image-0.0.2-py3.7.egg
Algorithm Hash digest
SHA256 d6a272f7db60055ff110f82ba649af412059f95370bfe193b6eb8304821874b8
MD5 3132fd7c4cdc1aab71c9cca2e5eda82a
BLAKE2b-256 ee59e619cf5b649c7bd39c03b7bec18cc61376945dca8b29319820a807533101

See more details on using hashes here.

File details

Details for the file dataframe_image-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: dataframe_image-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for dataframe_image-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ff2ac4296a733ef70b3d877c91eed5f3fdd3dd320249e16f92cbe60c07ef831
MD5 86c6469062add694954ca1d32842eb29
BLAKE2b-256 10f516e5a6225b546fee7050982b4c472a7d6566dfd716d90435ffe8e1df620c

See more details on using hashes here.

Supported by

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