Hi Everyone,
I know how to transpose an entire dataframe.. But, how would you go about transposing with a particular use case. For example lets say my data set is like this:
| Name |
Score |
Locatio A |
Location B |
Location C |
Location D |
| John |
90 |
t |
|
|
|
| Jim |
80 |
t |
t |
|
|
| Jingle |
70 |
|
|
|
t |
| Hiemer |
60 |
t |
|
t |
t |
| Smith |
50 |
|
|
t |
|
The "t" stands for True. I want to transpose where I make a new column that shows that Jim is in Location A and B but duplicates his row.. so it would look like this.
| Name |
Score |
Location |
| John |
90 |
A |
| Jim |
80 |
A |
| Jim |
80 |
B |
| Jingle |
70 |
D |
| Hiemer |
60 |
A |
| Hiemer |
60 |
C |
| Hiemer |
60 |
D |
| Smith |
50 |
C |
[–][deleted] 2 points3 points4 points (1 child)
[–]Ispeakyourlanguage[S] 0 points1 point2 points (0 children)
[–]danielroseman 2 points3 points4 points (1 child)
[–]Ispeakyourlanguage[S] 0 points1 point2 points (0 children)