Alteryx Designer Desktop Discussions

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

Python script filling up the temp drive?

Matthew
11 - Bolide

i have a very simple python script that i was testing out. when i run it in VSCode, the script runs in about 2 seconds.. but when i run it in alteryx, it takes about a minute, and then tells me that the temp drive is full.. what is going on here? the input is only about 1000 rows

 

 

from ayx import Package
from ayx import Alteryx
import pandas as pd
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

# Generate some sample data
data = Alteryx.read("#1")

# Sort the dataframe by group and x
data = data.sort_values(by=['group', 'x'])

# Generate a dictionary that maps each unique group name to a unique integer value
group_dict = {group: i for i, group in enumerate(data['group'].unique())}

# Map the group column to the corresponding integer value using the dictionary
data['group_num'] = data['group'].map(group_dict)

# Create a 3D figure
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

# Plot the data using the numeric group column as the z-coordinate
for group, group_num in group_dict.items():
    group_data = data[data['group'] == group]
    ax.scatter(group_data['x'], group_data['y'], zs=group_num, label=group)

# Set axis labels and legend
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
ax.set_zlabel('Group Label')
ax.legend()

# Show the plot
plt.show()

 

0 REPLIES 0
Labels