If columns are a MultiIndex then use this level to melt. ... print( df.stack() .reset_index(level=1) .sort_values("level_1") ...
確定! 回上一頁