Alteryx Designer Desktop Discussions

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

Outputting multiple dataframes from a single python tool instance

charter747
7 - Meteor

Hello. Alteryx newbie trying to send separate dataframes to different python tool outputs. What's the correct syntax? The below does not work. Thanks in advance.

 

 

from ayx import Alteryx
import re
import os
import pandas as pd
from pandas import DataFrame

# Ensure you always have this readMetadata piece to
# to get started
Alteryx.readMetadata("#1")
data1 = Alteryx.read("#1")
data2 = data1.iloc[:,0:5]
data3 = data1.iloc[:,0:5]

Alteryx.write(data2, 1, data3, 2)

 

1 REPLY 1
CathyS_Slalom
9 - Comet

Hi @charter747 , you would need to write multiple times, e.g. 

Alteryx.write(data1, 1)
Alteryx.write(data2, 2)
Alteryx.write(data3, 3)
Labels