I have a pandas df as
user | dates |
---|---|
a | {“2024-05-16”: -167} |
b | {“2024-03-28”: -104, “2024-04-12”: -108} |
Desired output
user | date | value |
---|---|---|
a | “2024-05-16” | -167 |
b | “2024-03-28” | -104 |
b | “2024-04-12” | -108 |
Basically, I want to each key in the json string to be in one row as ‘date’ and value in another column ‘value’.
Thanks!