I have a sheet that looks like this.
| Fleet Risk Control | Communication | Interpersonal relationships | Demographic | Demographic |
|---|---|---|---|---|
| Q_21086 | Q_21087 | Q_21088 | AGE | GENDER |
| 1 | 3 | 4 | 27 | Male |
What I'm trying to achieve is where there is a row with 'Q_' inside of it, merge that cell with the top row and return a new dataframe.
So the existing data above would become something like this:
| Fleet Risk Control - Q_21086 | Communication - Q_21087 | Interpersonal relationships - Q_21088 |
|---|---|---|
| 1 | 3 | 4 |
I honestly have no idea where to even begin with something like this.