我正在try 将以下列转换为新行:
Id | Prices |
---|---|
001 | ["March:59", "April:64", "May:62"] |
002 | ["Jan:55", ETC] |
到
id | date | price |
---|---|---|
001 | March | 59 |
001 | April | 64 |
001 | May | 62 |
002 | Jan | 55 |
The date:price pairs aren't s到red in a traditional dictionary format like the following solution:
Convert dictionary keys 到 rows and show all the values in single column using Pandas
I managed 到 get the key:value pairs in到 individual rows like:
Id | Prices |
---|---|
001 | March:59 |
001 | April:64 |
And could split these in到 two columns using string manipulation but this feels inefficient instead of actually using the key:value pairs. Can anyone help please?