This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
When ever I make an API call I am getting below sample data. Due to API call limitations ican only return 5000 recors at a time. if I have 50000 records I have to make 10 calls with 5000 records in each call.
Now I want to combine all these records into a single dictionary and then export into a csv file.
Code I have tried and failed, since the below codes are updating records in one of the dictionaries if the value exist
pd1 = pd.DataFrame(data)
pd2 = pd.DataFrame(data_1)
print(pd1.append(pd2))
def Merge(dict1, dict2):
res = {**dict1, **dict2}
return res
# Sample 2
dict1 = {'a': 10, 'b': 8}
dict2 = {'d': 6, 'c': 4}
dict3 = Merge(dict1, dict2)
print(dict3)
Sample Data:
*{'@odata.context': 'http://wabi-us-north-central-f-primary-redirect.analysis.windows.net/v1.0/myorg/admin/$metadata#grou...', '@odata.count': 2754, 'value': [{'id': 'ABCDEF-EC21-ABCDFEG-A6F9-fsdafsadf', 'isReadOnly': False, 'isOnDedicatedCapacity': True, 'capacityId': 'sdfasdfasd-F3A6-gfda-dsafas-asdfasd', 'capacityMigrationStatus': 'Migrated', 'type': 'Workspace', 'state': 'Active', 'name': 'DSS Dev Workspace', 'datasets': [{'id': 'sdfas-3436-fasdfas-a377-dsfa', 'name': 'Net Revenue Reporting v2', 'addRowsAPIEnabled': False, 'configuredBy': 'asdf.fdsa@asdfgasdf.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2019-09-18T20:05:21.887Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}, {'id': 'e102e519-8fa1-4e2f-95b4-d6e0fa85960a', 'name': 'Month Stats Review (1)', 'addRowsAPIEnabled': False, 'configuredBy': 'fasd.fasd@afdsasd.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2020-02-28T21:27:09.147Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}]}]}*
Hi Guys
I eneded up going one level down (value property) where the data is stored in list format. I have appended all data to a list and exported to txt file. As shown below.
'value': [{'id': 'ABCDEF-EC21-ABCDFEG-A6F9-fsdafsadf', 'isReadOnly': False, 'isOnDedicatedCapacity': True, 'capacityId': 'sdfasdfasd-F3A6-gfda-dsafas-asdfasd', 'capacityMigrationStatus': 'Migrated', 'type': 'Workspace', 'state': 'Active', 'name': 'DSS Dev Workspace', 'datasets': [{'id': 'sdfas-3436-fasdfas-a377-dsfa', 'name': 'Net Revenue Reporting v2', 'addRowsAPIEnabled': False, 'configuredBy': 'asdf.fdsa@asdfgasdf.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2019-09-18T20:05:21.887Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}, {'id': 'e102e519-8fa1-4e2f-95b4-d6e0fa85960a', 'name': 'Month Stats Review (1)', 'addRowsAPIEnabled': False, 'configuredBy': 'fasd.fasd@afdsasd.com', 'isRefreshable': True, 'isEffectiveIdentityRequired': False, 'isEffectiveIdentityRolesRequired': False, 'targetStorageMode': 'Abf', 'createdDate': '2020-02-28T21:27:09.147Z', 'contentProviderType': 'PbixInImportMode', 'upstreamDatasets': [], 'schemaMayNotBeUpToDate': False, 'users': []}]}]
Hi @Anonymous
I found some blogs, I hope they can help you.
Use Python in Power Query Editor
How to use Python/R to analyze a joined table in Power BI?
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |