Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含每月数据的数据框。索引是日期时间索引,另一列是数字列。
我想要做的是创建一个矩阵,其中我有 12 个月的顶部和年份作为行和数值作为矩阵的元素。
有没有一种聪明的方法可以在没有我循环的情况下做到这一点?