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 generate 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", "the_table")

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

Hyper Extract in Tableau

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.1.dev2.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

pantab-0.0.1.dev2-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

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