I currently have a Python Pandas DataFrame that I would like to convert to a custom JSON structure. Does anyone know how I can achieve this? I'd love to hear it, thanks in advance!
Current Pandas DataFrame structure:
ArticleNumber | Brand | Stock | GroupCode
-----------------------------------
1 | Adidas | 124 | 20.0
I would like to transform the above dataframe into a JSON structure below:
{
"Attributes": [
{
"Key": “ArticleNumber”,
"Values": [
“1”
]
},
{
"Key": “Brand”,
"Values": [
“Adidas”
]
},
{
"Key": “Stock”,
"Values": [
“124”
]
},
{
"Key": “GroupCode”,
"Values": [
“20.0”
]
},
]
}