I have a table and I want to convert it using Python 3x Pandas into the following:
| Group | Assessment | Review |
|---|---|---|
| GroupA | No team spirit | Negative |
| GroupA | Good players | Positive |
| GroupA | They scored well | Positive |
| GroupB | Goal failed | Negative |
| GroupB | Bad weather | Negative |
| GroupB | Resilience | Positive |
| GroupB | Growth potential | Positive |
| GroupB | Bad technique | Negative |
Resulting table should be:
| Group | Positive | Negative |
|---|---|---|
| GroupA | Good players | No team spirit |
| GroupA | They scored well | NaN |
| GroupB | Resilience | Goal Failed |
| GroupB | Growth Potential | Bad weather |
| GroupB | NaN | Bad Technique |
Is there any neat, Pythonic way of doing it using Pandas or other method?