I have a DataFrame with a column including numpy arrays:
df = pd.DataFrame({'Arrays': [np.array([1, 2, 3]),
np.array([4, 5, 6]),
np.array([7, 8, 9])]})`
I need to extract the data in a way that I get a 2-dimensional array out of it. Like this:
array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])`
But df.values
results in an array containing a list of arrays:
array([[array([1, 2, 3])],
[array([4, 5, 6])],
[array([7, 8, 9])]], dtype=object)`
Is there an operator for this kind of problem or do I need to loop over all entries?