0

I am trying to pivot this data:

Id Worry 1 Worry 2 happy 1 happy 2 trust 1 trust 2 Time
1 3.0 2.0 1.0 2.0 3.5 3.0 1
1 3.0 2.0 1.0 2.0 3.5 3.0 2
2 2.5 4.0 2.0 4.0 2.5 5.0 1
2 2.5 4.0 2.0 4.0 2.5 5.0 2

to look like this:

Id Worry happy trust Time
1 3.0 1.0 3.5 1
1 2.0 2.0 3.0 2
2 2.5 2.0 2.5 1
2 4.0 4.0 5.0 2

meaning, I want values of worry 1, happy 1, and trust 1 to be in line with Time = 1, and values of worry 2, happy 2, and trust 2 to be in line with Time = 2, for each Id.

Thank you for your help!

Ritchie Sacramento
  • 29,890
  • 4
  • 48
  • 56

0 Answers0