I have a DataFrame with various text and numeric columns which I use like a database. Since a column can be of dtype object, I can also store more complex objects inside a single cell, like a numpy array.
How could I store another DataFrame inside a cell?
df1=pd.DataFrame([1,'a'])
df2=pd.DataFrame([2,'b'])
This assigment fails:
df1.loc[0,0] = df2
ValueError: Incompatible indexer with DataFrame
PS. It is not a duplicate question as suggested below since I do not want to concatenate the "sub"-DataFrames
= 1