I'm trying to open up a pickle file of a large data set, but am running into an issue with the resultant data type. The result gives a list with an array inside, I need to unpack the list to get the array inside. I think it can be boiled down to the following example. Say I have
x = [array([1,1,1], [1,1,1])]
(type(x) = list)
I want to unpack this list so that it's just the array inside. I.e., I want
y = array([1,1,1], [1,1,1])
(type(y) = numpy.ndarray)
I'm relatively new to Python programming and could use a hand on how to do this easily. Please let me know if I need to clarify my question.
I'm not sure if it matters here, but I'm using Python 3.7.6.
EDIT
Looks like I made a mistake when putting in the array for x. To clarify, this is what I'm getting when I unpack the pickle file.
x = pandas.read_pickle(data_source)
print(x)
> [array([1,1,1],[1,1,1])]