Hi, the Alteryx.write(df,1) line doesn't output the entire dataframe only the first row, when I try to print it out in the jupyter env the dataframe is correctly built an displayed. Thanks!
Hi @Istwineres,
Might be due to the standard profiling limit of the results pane (10mb data) and not your Python code, if you add a browse tool after the "1" anchor of the Python tool and re-run that might resolve your issue?
Kind regards,
Jonathan
The browser tool is empty, the dataframe is filled with just 8 records. I think the problem is how I built the dataframe: cannot convert list into series and then dataframe
SUCCESS: writing outgoing connection data 1SUCCESS: writing outgoing connection data 2SUCCESS: writing outgoing connection data 3
But nothing in output except first row for the dataframe in #1 output connection
That's the code:
from ayx import Alteryxfrom zipfile import ZipFileimport fnmatchimport pandas as pdimport os
data = Alteryx.read('#1')full_path_zip = data.iloc[0][0]directory = data.iloc[0][1]
with ZipFile(full_path_zip,'r') as zipObj:zipObj.extractall(path=directory)
dataf= pd.DataFrame()list_full_path = []for path in os.listdir(directory):full_path = os.path.join(directory,path)if os.path.isfile(full_path):if fnmatch.fnmatch(full_path,'*.csv'):list_full_path.append(full_path)
dataf.insert(0,'file_full_path',list_full_path)
file_size_list = []for path in list_full_path:file_size_list.append(os.path.getsize(path))dataf.insert(1,'file_size',file_size_list)
os.remove(full_path_zip)Alteryx.write(dataf,1)