Is it possible to visualize in the UI the column names of a pickle?

Hi all! I am stuck trying to upload and then visualize the column names of a pickle (.sav) in the UI.

With Python I would use the following code for the visualization of the column names: 

import pickle 
pickle_path = r"D:\downloads\pickle_test.sav"
gpds = pickle.load(open(pickle_path), "rb") #open pickle to read it
gpd = gpds['dict1'] #select the dictionary
gpd.info() #show column names

My knowledge of JavaScript is limited and I don't know how to do it. Could someone help me?

Thanks in advance!

Cheers,
Marina 

Hello,

pickle is a python function, when you do pickle.load you are loading a python data type.

It's not possible to do this directly from your Ui designer, that is not compatible with Python.

In the UI designer you can use mainly angular-js and javascript libraries.

You can try to use jpickle library: https://www.npmjs.com/package/jpickle , a javascript library. Once you understand how it works from the documentation try to add it as an asset in the UI designer and play with it.

Cheers,

You mention JavaScript, so I assume you are trying to do it in a form. I don't know if it can help in your use case, but you can use a file widget on your form and let the user select and upload the file.