0
我有一个数据帧像这样:枢转基于唯一值
Allotment NDWI DEM TWI Land_Cover
Annex 10 1.2 4 PHP
Annex 10 1.2 4 PHP
Annex 10 1.2 4 WMTGP
Annex 10 1.2 4 SP
Berg 5 1.7 5 BNW
Berg 5 1.7 5 BNW
Berg 5 1.7 5 SP
Berg 5 1.7 5 WMTGP
,我想它转动,以使行特定Allotment
所有的独特的价值观成为自己列。
我所需的输出是:
Allotment NDWI DEM TWI Land_Cover1 Land_Cover2 Land_Cover3
Annex 10 1.2 4 PHP WMTGP SP
Berg 5 1.7 5 BNW SP WMTGP
是否有纳入.unique()
到透视表或重塑的方法吗?