this is my first time using pandas and this forum.
I have a table of scientific data with behavioral observations made, where the first column represents the type of observations and the rows are the corresponding behavioral scores. These columns are non-descript, and are varying across experiments.
My table looks something like this:
| | Unnammed 1 | Unnammed 2 | Unnammed 3 |
| -------- ----- | -------------- | --- ----------
| Date ............. |..................
| Arm movement | 1 ................. | 2 .............. | 2 ..... |
| Leg movement | 2 .............. | 1................. | 1......... |
| Head movement| 1 ............. | 1 ............... | 2..........
| Time ............... | 0:05 ......... | 0:10 .......... | 0:15 .... |
| Date |
| Arm movement | 3 ............. | 0 ............... | 2 .........
| Leg movement | 2 .............. | 3 ............... | 1 .........
| Head movement| 1 ...... ...... | 1 ................ | 3 ........
| Time ................. | 0:12 ........ | 0:17 .......... | 0:22 .....
My idea was to transpose this table, since it seems to me that pandas is far more powerful when working with operations relating to the columns. However, this leaves me with a table where the column names are repeated but with unique row values. Is there a way for me to keep only the unique column names, and insert the values from the repeated columns into the unique columns?
I've tried using the functions: stack, unstack, reshape and pivot, but with no success.