I have a following data table.
| Timestamp | Energy_KWh |
|---|---|
| 2021-01-01 00:00:00 | 10 |
| 2021-01-01 00:30:00 | 11 |
| 2021-01-01 01:00:00 | 9 |
| 2021-01-01 01:30:00 | 8 |
| 2021-01-01 02:00:00 | 9 |
| 2021-01-01 02:30:00 | 13 |
| 2021-01-02 00:00:00 | 16 |
| 2021-01-02 00:30:00 | 19 |
| 2021-01-02 01:00:00 | 90 |
| 2021-01-02 01:30:00 | 81 |
| 2021-01-02 02:00:00 | 1 |
| 2021-01-02 02:30:00 | 11 |
I want to change time part into columns.. like this..
| DATE | 00:00:00 | 00:30:00 | 01:00:00 | 01:30:00 | 02:00:00 | 02:30:00 | 03:00:00 | 03:30:00... |
|---|---|---|---|---|---|---|---|---|
| 2021-01-01 | 10 | 11 | 9 | 8 | ||||
| 2021-01-02 | 16 | 19 | 90 | 81 |
The time goes on for all day.. there should be 48 columns (24 hours x 2)
I would be thankful if anyone can help with this issue.
Thanks...