Hi,
I’m trying to load a python file that was pickled using joblib. The file is a python dict that contains several objects, including a few DataFrames. When I load the dict in Python it’s fine, but when I try to load it through PyCall the DataFrames turn into pointers like PyObject Ptr{PyCall.PyObject_struct} @0x00007f124438c3d0
Example code:
using PyCall
joblib = pyimport("joblib")
output_dict = joblib.load("myfile.pickle")
Output:
Dict{Any,Any} with 6 entries:
"array1" => [3.84204, 3.90863, 3.91936, 4.1192, 4.13436, 4.14225…
"array2" => Any["b544ea00d3efc43c18d34c5cbd58882340016f6c" PyObj…
"int" => 14
"df1" => PyObject Ptr{PyCall.PyObject_struct} @0x00007f124438…
"df2" => PyObject Ptr{PyCall.PyObject_struct} @0x00007f12444e…
"df3" => PyObject Ptr{PyCall.PyObject_struct} @0x00007f124433…
Is there a way to recover the Python object from these pointers?
I attempted to create an MWE, but couldn’t reproduce the issue – saving and loading a dataframe worked correctly.