Pandas: So schwenken Sie eine Spalte in Zeilen in Spalten
Gab diesen Datenrahmen:
feature score searchTerm
0 a 0.534509 pizza
1 b 0.586020 pizza
2 c 0.588972 pizza
3 a 0.566261 chinese
4 b 0.572405 chinese
5 c 0.489369 chinese
6 a 0.499068 thai
7 b 0.431068 thai
8 c 0.441617 thai
Feature ist begrenzt auf a
,b
,c
)
Ich möchte den Datenframe in diesen schwenken:
a b c searchTerm
0.534509 0.586020 0.588972 pizza
0.566261 0.572405 0.489369 chinese
, 0.499068 0.431068 0.441617 thai
...
...