I've been stuck with an engineering problem thats Python/Pandas related. I'd appreciate any help given. I've simplified the numbers so I can better explain myself. I have something similar to the following:
| positioning(x-axis) | Calculated difference | |
|---|---|---|
| 1 | 0.25 | 0.05 |
| 2 | 0.75 | 0.06 |
| 3 | 1.25 | 0.02 |
| 4 | 0.25 | 0.05 |
| 5 | 0.75 | 0.05 |
| 6 | 1.25 | 0.02 |
| 7 | 0.25 | 0.09 |
| 8 | 0.75 | 0.01 |
| 9 | 1.25 | 0.02 |
| 10 | 0.25 | 0.05 |
What I need to do is re-organise the calculated difference based on the x-axis positioning. So it looks something like this:
| (0.25) | (0.75) | (1.25) |
|---|---|---|
| 0.05 | 0 | 0 |
| 0 | 0.06 | 0 |
| 0 | 0 | 0.02 |
| 0.5 | 0 | 0 |
| 0 | 0.5 | 0 |
| 0 | 0 | 0.02 |
| 0.09 | 0 | 0 |
| 0 | 0.01 | 0 |
| 0 | 0 | 0.02 |
| 0.05 | 0 | 0 |
As you can see, I need to organize everything based on the x-positioning. What is the best approach to this problem? Keep in mind I have 2000+ rows and the x positioning is dynamic but I'm currently working till up to 50(so a lot of columns).
I hope I've clarified the question.