Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Use Python tool output data as input to workflow

krishma04
6 - Meteoroid

Hey guys,

 

I have a workflow where I use input data tool which is worked upon using the Python tool.

But after the transformation I make , that python tool outputs a new dataframe which I want to pass ahead as the data to be used in the workflow.

 

I cannot understand how to get the data to be fed directly into select tool or summarize tool?

 

Any help? Thanks in advance

5 REPLIES 5
Shane318
5 - Atom

Hi Krishma,

 

Do you have column headers on the data frame? I have previously parsed a data frame out of the python tool, without column headers it references the rows as individual fields I am assuming that by adding the column headers you will be able to input into the select tool and choose the desired columns (or similarly the summarize tool)?

 

If this isn't the case or you have already done this, can you please elaborate on what you currently have so the community can further understand your problem?

 

Thanks,

Shane

GiuseppeC
Alteryx
Alteryx

Hi @krishma04,

 

isn't the function Alteryx.write(dataframe, outputnumber) giving you what you expect? See below:

 

clipboard_image_0.png

 

Hope this helps!

Giuseppe

krishma04
6 - Meteoroid

Hi Shane,

 

My dataframe does have the headers but the only thing that the select tool gets when I use Alteryx.write(df,1) is shown in the picture below.

 

problem with output.PNG

 

I do not know if there is some other way to directly integrate the data

Shane318
5 - Atom

Hi Krishma,

 

Have you run your workflow after connecting the select tool to the python tool? When I first connected the select tool to output 1 of the python tool it displayed the same screen as you have. Once I ran the workflow the select tool was able to pick up the headers.

 

If it helps I have attached an example workflow.

 

Thanks,

Shane

krishma04
6 - Meteoroid

Thank you for your solution, I realized the algorithm was not picking pandas as the package initially and that's why the output was Unknown in the select tool

 

Thanks again,

Krishma

Labels
Top Solution Authors