How could I transform the following dataframe
Subject A1 A2 A3
S001 24.0 25.0 25.0
S002 12.0 14.0 5.0
S003 10.0 12.0 3.0
...
into the following:
pax score facet
S001 24.0 A1
S002 12.0 A1
S003 10.0 A1
...
S001 25.0 A3
S002 5.0 A3
S003 3.0 A3
df=df.T is not working should I write a for loop? Thank you for you help.