Inputting (a lot of )data into a dataframe one row at a time
I'm getting timeit results of about 1/4 of the time using:

flatX = X.apply(lambda x: x.flatten())
pd.DataFrame(item for item in flatX)


See also 
https://stackoverflow.com/questions/45901018/convert-pandas-series-of-lists-to-dataframe
for some possibly better options for the second line.

(Regarding my earlier comment, I don't get any real savings by just dataframe-ing at the end.)