且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将多行数据合并为一列

更新时间:2022-12-11 22:25:04

如果每个年的行数相同,则一个选项是 unstack

One option is unstack if the number of rows per 'year' is the same

unstack(df1, Male ~ year)