My list has many elements. I want to save them to a newly created dataframe. I want to append each element of this list as a column element to the dataframe.
My code:
oplist = [[2,3,4,10,12,3,4],-0.4,1.23456E-6] # list saves all output values
opdf = pd.Dataframe() #creating an empty dataframe
opdf.append(oplist)
Present output:
TypeError: object of type 'numpy.float64' has no len()
Expected output:
opdf =
0 1 2 # unnamed columns
0 [2,3,4,10,12,3,4] -0.4 1.23456E-6 # first row