I have a numpy array and an empty dataframe:
element = numpy.array([1,2,3]) df = pandas.DataFrame(columns = ["Col"])
I want to insert
element in the first row of
df. The following code:
df["Col"] = element
Gives me a dataframe 3x1 whose elements are 1, 2 and 3. I want a dataframe 1x1 whose element is the array. How can I get this result? Thanks in advance!