最近写的项目中有一个这样子的要求,只有一行的dataframe,将其的行和宽互换
代码:
df = df.stack().unstack("TechDate")
unstack里面可以选取需要将其转换成列名的行名