Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Outputing python results not working

marcin2x4
9 - Comet

I'm begining my python adventure but found issue with extracting data back to the workflow from python tool.

 

Using pandas I want to simply extract values from one column. After assigning variable I get below:

 

mszpot89_0-1581670550521.png

 

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

Hello @marcin2x4,

 

What you are extracting like this is a pandas Series.

 

If you want to output it you would need a pandas dataframe.

 

Try to add the following

 

ct = pd.DataFrame(df['CreationTime'])

 

Not elegant but works!

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

marcin2x4
9 - Comet

 

Alternative

df = pd.DataFrame(data['CreationTime'])

 

afv2688
16 - Nebula
16 - Nebula

Much cleaner you solution for sure!

 

Just edited the last row.

 

If you need anything else here we are to help as much as possible!

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Labels
Top Solution Authors