Hi I am trying to create a macro using python code which will perform text to column and then rows.
I have written the code in python however my input is not getting processed.
My code doesn't the input value I give through action
My code:
#################################
# List all non-standard packages to be imported by your
# script here (only missing packages will be installed)
from ayx import Package
#Package.installPackages(['pandas','numpy'])
#################################
from ayx import Alteryx
df=Alteryx.read('#1')
x=Alteryx.read('#2')
y=Alteryx.read('#3')
#################################
import pandas as pd
#################################
split=df[x].str.split(y,expand=True).add_prefix(x)
split
#################################
combine=pd.concat([df, split],axis=1)
combine
#################################
texttoRow=pd.melt(combine[combine.columns], id_vars=combine[df.columns]).dropna(axis=0,subset=['value'])
texttoRow
#################################
Alteryx.write(texttoRow,1)