'How can I put separate row of dictionary into Dataframe and export to csv file?
Data is Dictionary in a separate line. How can I put it together into Dataframe and export to civ file?
json_responses = response.text.split('\n')
for item in json_responses:
if item != '':
dic = json.loads(item)
print(dic)
{'sku_id': 'A', 'primary_category_code': 'AA52103320001', 'primary_store': 'F0001001'}
{'sku_id': 'B', 'primary_category_code': 'AA52103320001', 'primary_store': 'F0001001'}
{'sku_id': 'C', 'primary_category_code': 'AA52103320002', 'primary_store': 'F0001002'}
{'sku_id': 'D', 'primary_category_code': 'AA52103320002', 'primary_store': 'F0001002'}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
