Please see the attached image showing a DataFrame (left_table in the picture, wrote this as a code in the following). I want to transform it to the right_table in a simple way (using pivot, melt, transposing etc).
arrays = [
["T1", "T1", "T2", "T2"],
["C2", "C3", "C2", "C3"],
]
tuples = list(zip(*arrays))
index = pd.MultiIndex.from_tuples(tuples, names=["C1", "second"])
index
Left_table = pd.DataFrame(np.random.randn(2, 4), index=["N1", "N2"], columns=index)
Left_table
