stack and unstack
默认level参数为最内层索引,stack是列名转行名,unstack是行名转列名
groupby聚合后也可以用这个方法,实现生成类似数据透视表的功能
【Python】Pandas Notes
Author: Nananan
Post Date: 2022-12-01 14:46:46 Update Date: 2022-12-03 23:41:40License: Copyright © 2020 CC 4.0 BY-SA LICENSE
stack and unstack
默认level参数为最内层索引,stack是列名转行名,unstack是行名转列名
groupby聚合后也可以用这个方法,实现生成类似数据透视表的功能
Author: Nananan
Post Date: 2022-12-01 14:46:46 Update Date: 2022-12-03 23:41:40License: Copyright © 2020 CC 4.0 BY-SA LICENSE