I need to use request package to use API. The API from IT takes a JSON string which look exactly like this:
{
"StoreCode": "7144",
"GlovoStoreCode": "7144_1",
"ProductList": [
{
"GlovoId": "10"
},
{
"GlovoId": "10"
}
]
}
I have a DF frame (image) and I am using .to_json
function but I cant get result like should be.
Could please someone let me knot how to convert my df to result exactly like API needs. Really thanks!
StoreCode GlovoStoreCode ProductList
0 4452 4452_1 360908 1 4452 4452_1 125539 2 4452 4452_1 297758 3 4452 4452_1 2025651