In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Output from Python Tool

jdemeyer
7 - Meteor

Greetings!

 

I have reviewed other posts on this topic but did not find one that helped.  My python code extracts data from a file and places it into a DataFrame.  When the extraction completes, I use Alteryx.write to write the DataFrame out.

 

I want to save the output to a CSV file however the output from the Python tool is formatted with extra quotes and brackets (image below, some data is redacted with a yellow square) that make the CSV unusable in my instance.

 

20210615DFOutput.jpg

 

Ideas on how to produce DataFrame output without extra characters?

 

Thanks!

Joe

2 REPLIES 2
BrandonB
Alteryx
Alteryx

If you want to do it with Alteryx tools you could follow it with two multi field formulas. One says Trim([_CurrentField_], "['") and the second says Trim([_CurrentField_], "']")

jdemeyer
7 - Meteor

Thanks BrandonB!

 

With the addition of two Multi Field Formula tools, I successfully created a usable CSV file.  I'll mark that as the solution.

 

I appreciate the solution but I was wondering if it was possible to change the formatting from the DataFrame.  Perhaps a custom formatter that is called during the execution of Alteryx.write?

 

Thanks!

Labels
Top Solution Authors