ive created a density plot using python, and ive managed to print out a series of data points that define the shape of the density plot
i can make it print into the alteryx runtime log, but i cannot make it output through the Alteryx.Write() function
the problem is that i am getting the data points from a loop statement and i dont know how to compile it into a single DataFrame to pass to the write function..
can someone please help?
hey @Matthew
You will need to initialise a dataframe prior to the loop, and then append the new data to the dataframe, each iteration of the loop using the following:
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.append.html
Hope this helps,
TheOC
Thank you, I'll give it another try
I have tried this already though. The challenge I'm running into is I can't seem to figure out how to size the data frame to fit the data.. each iteration of the loop appears to contain an entire array of values (one complete layer of the density map)
I'm getting very close. But two problems remain:
hey @PhilipMannering i still need the original datapoints, but i can always union them together after the macro processes the curves
edit: i see what youre asking.. yes i need the data points that make up each contour. i want to treat each layer as its own spatial object.. in fact, i'm hoping to get even more control over those layers.. i'd love to specify the confidence interval that each layer represents