在 (id、性别和工作) 分组操作后,我得到了如下结果:
我想要从这里创建类似于这样的东西:
id geneder job salary
22 male engineer 100
doctor 120
...
female engineer 90
doctor 100
...
23 male engineer 200
doctor 150
...
female engineer 80
doctor 100
我想要从这里创建类似于这样的东西:
id m_engineer m_doctor ... f_engineer f_doctor
22 100 120 90 100
23 200 150 80 100
我尝试使用数据透视表,但仍然存在错误。 有任何想法吗?