Python数据透视表 2017-05-29 本文已影响503人 耳朵和爪子 stack() 的作用是将DataFrame的一个列变成一个Index, unstack()的作用是将DataFrame的一个Index变成一个列。