Skip to main content

Converts pandas DataFrames into Tableau Hyper Extracts

Project description

pantab: Connecting pandas with Tableau

What is it?

pantab is a tool to help read and write Hyper extracts (available with Tableau 10.5+) from a pandas DataFrame.

import pandas as pd
import pantab

df = pd.DataFrame(
    [[1, 2, 3, 4., 5., True, pd.to_datetime('1/1/18'), 'foo'],
     [6, 7, 8, 9., 10., True, pd.to_datetime('1/1/19'), 'foo']
     ], columns=['foo', 'bar', 'baz', 'qux', 'quux', 'quuuz', 'corge',
                 'garply'])

pantab.frame_to_hyper(df, "foo.hyper", table="the_table")

The above will generate a Hyper extract in the specified location, which you can then open in Tableau.

Hyper Extract in Tableau

You can also read the same extract back in as follows:

df = pantab.frame_from_hyper("foo.hyper", table="the_table")

Requirements & Installation

  • Python >= 3.6
  • Tableau Hyper API (see installation instructions here)
  • pandas

The preferred way to install this package is from pip. Note that this will resolve the pandas dependency for you but will not resolve the Tableau Hyper API dependency. Please refer to their installation instructions.

pip install pantab

If you want to run the test suite for this application, you will also need to install pytest.

Contributing

Want to make this package better? Awesome - any and all contributions are appreciated! With that said, any code contributions must contain test cases to be considered for merging.

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

pantab-0.0.1a1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

pantab-0.0.1a1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file pantab-0.0.1a1.tar.gz.

File metadata

  • Download URL: pantab-0.0.1a1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for pantab-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 cb09d873c96f0fd5a165861bba14233b0a833381e2b97f12de645dbb0fcabb2c
MD5 8d740dde9d120b5cbb6af3f9fbb8e57d
BLAKE2b-256 4b620974edf3f1cc802d41c0ec498bb38b27ba0167a4fb3f46343864c97e0a6d

See more details on using hashes here.

Provenance

File details

Details for the file pantab-0.0.1a1-py3-none-any.whl.

File metadata

  • Download URL: pantab-0.0.1a1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for pantab-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 e590eb4e2856478b6d84a7fd4a2c23429b681dab25cefa407644bd97d1943626
MD5 8c5cee7df00dde5b6cc4f29e53a215a3
BLAKE2b-256 fa8e30e2d8e2eae695367abe8b6891d16e89c88d2dcff2321b34d9c6a48c2b78

See more details on using hashes here.

Provenance

Supported by

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