Metadata-Version: 1.1
Name: pandleau
Version: 0.2
Summary: A quick and easy way to convert a Pandas DataFrame to a Tableau extract.
Home-page: https://github.com/bwiley1/pandleau
Author: Benjamin Wiley
Author-email: bewi7122@colorado.edu
License: MIT
Download-URL: https://github.com/bwiley1/pandleau/dist/pandleau-0.2.tar.gz
Description-Content-Type: UNKNOWN
Description: # pandleau
        
        A quick and easy way to convert a Pandas DataFrame to a Tableau extract.
        
        ## Getting Started
        
        ### Prerequites
        
        You'll need to install tableauSDK directly from Tableau's site: https://onlinehelp.tableau.com/current/api/sdk/en-us/SDK/tableau_sdk_installing.htm. 
        
        ### Installing
        
        Once installing tableauSDK is done, download this repository, navigate to your downloads file and run the following in cmd:  
        ```bash
        python -m setup.py install
        ```
        
        ## Example
        
        I grabbed the following Brazil flights data off of kaggle for this example: https://www.kaggle.com/microtang/exploring-brazil-flights-data/data.
        
        ```python
        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['LatDest'].apply( lambda x: "POINT (" + str( round(x, 6) ) ) + \
        	example_df['LongDest'].apply( lambda x: " "+str( round(x, 6) ) + ")" )
        
        # Change to pandleau object
        df_tableau = pandleau(example_df)
        
        # Define spatial column
        df_tableau.set_spatial('SpatialDest')
        
        # Write .tde Extract!
        df_tableau.to_tableau('example.tde')
        
        ```
        
        ## Authors
        
        * **Benjamin Wiley** - [jamin4lyfe](https://github.com/bwiley1)
        
        ## License
        
        This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
        
Keywords: tableau pandas extract tde
Platform: UNKNOWN
Classifier: Programming Language :: Python
