def test_pivot_table_multiple(self):
index = ['A', 'B']
columns = 'C'
table = pivot_table(self.data, index=index, columns=columns)
expected = self.data.groupby(index + [columns]).agg(np.mean).unstack()
tm.assert_frame_equal(table, expected)
test_pivot.py 文件源码
python
阅读 41
收藏 0
点赞 0
评论 0
评论列表
文章目录