All Projects → bwiley1 → pandleau

bwiley1 / pandleau

Licence: MIT license
A quick and easy way to convert a Pandas DataFrame to a Tableau .hyper or .tde extract.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pandleau

hyper-api-samples
Sample code to get started with the Hyper API.
Stars: ✭ 80 (+33.33%)
Mutual labels:  hyper, tableau
hyper-materialshell
A material design theme for Hyper based on materialshell. ✨
Stars: ✭ 72 (+20%)
Mutual labels:  hyper
Hyper Hypest
A beautiful and minimal macOS theme for Hyper
Stars: ✭ 159 (+165%)
Mutual labels:  hyper
Hyper Cat
Turn your Hyper terminal into nyan cat while typing.
Stars: ✭ 195 (+225%)
Mutual labels:  hyper
Dotfiles Win
🙈 oh-my-zsh on bash on windows configuration files
Stars: ✭ 167 (+178.33%)
Mutual labels:  hyper
Facebook Political Ads
Monitoring Facebook Political Ads
Stars: ✭ 215 (+258.33%)
Mutual labels:  hyper
Zsh Theme
Yet another zsh theme
Stars: ✭ 153 (+155%)
Mutual labels:  hyper
tableau-server-docker
Dockerfile for Tableau Server on Linux - Single Node
Stars: ✭ 111 (+85%)
Mutual labels:  tableau
tableau-examples
Example Tableau calculated fields, workbooks, data extracts, data sources, and map sources
Stars: ✭ 20 (-66.67%)
Mutual labels:  tableau
Cheat Sheets
Cheat Sheets 🐭🤖👀
Stars: ✭ 185 (+208.33%)
Mutual labels:  hyper
Hyperlayout
📐 Layout presets for Hyper.app
Stars: ✭ 184 (+206.67%)
Mutual labels:  hyper
Routerify
A lightweight, idiomatic, composable and modular router implementation with middleware support for the Rust HTTP library hyper.rs
Stars: ✭ 173 (+188.33%)
Mutual labels:  hyper
Hyper Star Wars
Super awesome your Hyper terminal shall look
Stars: ✭ 233 (+288.33%)
Mutual labels:  hyper
Hyper Pane
Extension for Hyper.app to enhance pane navigation.
Stars: ✭ 160 (+166.67%)
Mutual labels:  hyper
hyper-proxy
A proxy connector for Hyper-based crates
Stars: ✭ 73 (+21.67%)
Mutual labels:  hyper
Aura Theme
💅 A beautiful dark theme for your favorite apps.
Stars: ✭ 159 (+165%)
Mutual labels:  hyper
Hyperborder
adds a gradient border to the Hyper terminal
Stars: ✭ 183 (+205%)
Mutual labels:  hyper
Hyperocean
Deep oceanic blue Hyper theme
Stars: ✭ 207 (+245%)
Mutual labels:  hyper
AndroidTableauLibrary
AndroidTableauLibrary is an Android SDK library supports variety of analytic graphs which developers simply integrate on Android project. - by @sung2063
Stars: ✭ 53 (-11.67%)
Mutual labels:  tableau
doki-theme-hyper
Cute anime character themes for Hyper.js.
Stars: ✭ 67 (+11.67%)
Mutual labels:  hyper

pandleau

A quick and easy way to convert a Pandas DataFrame to a Tableau .tde or .hyper extract.

Getting Started

Prerequisites

  • If you want to output as a .tde format, you'll need to install TableauSDK directly from Tableau's site here.
  • If you want to output as a .hyper format, you'll need to install Extract API 2.0 directly from Tableau's site here.
  • Although Tableau's site claims Python 3 is not supported, this module has been tested to work fully functionally on Python 3.6.

Installing

Once installing TableauSDK is done, download this repository, navigate to your downloads file and run the following in cmd or terminal:

python -m setup.py install

You can also install pandleau using pip:

pip install pandleau

But note that this will throw a warning to install tableausdk using the above link in Prerequisites.

Example

I grabbed the following Brazil flights data off of kaggle for this example: https://www.kaggle.com/microtang/exploring-brazil-flights-data/data.

import pandas as pd
from pandleau import *

# Import the data
example_df = pd.read_csv(r'example/BrFlights2.csv', encoding = 'iso-8859-1')

# Format dates in pandas
example_df['Partida.Prevista'] = pd.to_datetime(example_df['Partida.Prevista'], format = '%Y-%m-%d')
example_df['Partida.Real'] = pd.to_datetime(example_df['Partida.Real'], format = '%Y-%m-%d')
example_df['Chegada.Prevista'] = pd.to_datetime(example_df['Chegada.Prevista'], format = '%Y-%m-%d')
example_df['Chegada.Real'] = pd.to_datetime(example_df['Chegada.Real'], format = '%Y-%m-%d')

# Set up a spatial column
example_df.loc[:, 'SpatialDest'] = example_df['LongDest'].apply( lambda x: "POINT (" + str( round(x, 6) ) ) + \
	example_df['LatDest'].apply( lambda x: " "+str( round(x, 6) ) + ")" )

# Change to pandleau object
df_tableau = pandleau(example_df)

# Define spatial column
df_tableau.set_spatial('SpatialDest', indicator=True)

# Write .tde or .hyper Extract!
df_tableau.to_tableau('test.hyper', add_index=False)

Tableau Server/Online Automation

Eric Chan (erickhchan) wrote a really cool blog post on using Python to blend and clean data before pushing it to Tableau Online (which is a SaaS version of Tableau Server). This is a great way to learn how to automate the data refresh process with Tableau Server Client and Pandleau. Check out his blog post here: https://www.erickhchan.com/data/2019/03/18/python-tableau-server.html

Authors

Related Project

RTableau Convert R data.frame to Tableau Extract using pandleau

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].