I have a pandas.core.frame.DataFrame
that looks like this:
0 1
0 [1,2,3] 1
1 [2,2,1] 1
2 [1,2,1] 1
...
The last column is the label and each of the arrays under column '0' are supposed to be different datapoints for a given class.
I want this to be turned into:
x0 x1 x2 label
0 1 2 3 1
1 2 2 1 1
2 1 2 1 1
I have tried the following with no luck
ds = ds.apply(lambda x: numpy.ravel(x))
That was result of the following, obviously that is not the right way to do this.
<list>.extend(zip(points,labels))
ds = pandas.core.frame.DataFrame(data=<list>)
Any help is appreciated, on how to fix the actual dataset or create it correctly having the two lists (points and labels).