Suppose x = pd.DataFrame({'a': range(0,3), 'b': range(1, 4)}) and y = pd.DataFrame({'a': range(-1,2), 'b': range(2, 5)}). I want to construct a dataframe t = pd.DataFrame('x': x, 'y': y). The expected result is a multiindexed dataframe. However, an error message tells me ValueError: If using all scalar values, you must pass an index.
import panda as pd
x = pd.DataFrame({'a': range(0,3), 'b': range(1, 4)})
y = pd.DataFrame({'a': range(-1,2), 'b': range(2, 5)})
t = pd.DataFrame('x': x, 'y': y)