MIP Logo

Alteryx 2018.3 : Python Tool Demo

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here. 

Python Tool

Alteryx long anticipated version update (2018.3) came with some very interesting new features. ( Caching at tool level, Python Tool, etc..)

Personally, I was particularly looking forward for the new Python tool that allows the user to read, process, and write data in an Interactive Jupyter Notebook. This is important for me since I already feel comfortable with the language, and it makes Macros and Predictive Learning objectives much easier. The new ayx library performs three main functions. Alteryx.read() , Alteryx.wriite(), and Alteryx.help(). 

To read data from an input or text tool, simply use Alteryx.read( # Number of the connection). The tool also allows 5 output files, and the user assigns an output file to a specific node using Alteryx.write ( dataframe , Position of the Node). The user can also read files directly into the Notebook without an incoming connection using Pandas Library ( pd.read_csv( file path/file name.csv)).

Tool Demo

Last week we were covering date manipulation and parsing in Alteryx and Tableau, and we came across an Alteryx Date Macro Challenge, where the objective was to create a macro with a Date User Interface that spits back a list of dates from the selected date until today’s date. I decided to test out the new tool on this challenge. The Alteryx Workflow below shows the used jupyter notebook and the tools used to achieve the objective above.

Below is the output of the python date macro

Glitches

I was pretty happy with the result, but there were some glitches in the tool. Initially, I was trying to output the final result, but for some reason the conversion was failing, so  I saved the macro and the jupyter notebook, and restarted Alteryx to run again, but for some reason the notebook failed to save, so I had to write it all over again. ( for future purposes I would download a copy of the notebook to make sure it is saved.)

Share this post