I am new to Python and want to store a nested dictionary keys as rows in a pandas dataframe. Specifically, here is how the dictionary looks like:
apicalls= [{'GetNativeSystemInfo': 1, 'DeviceIoControl': 2, 'RegCloseKey': 1, 'NtDuplicateObject':
1,'NtSetInformationFile': 5,{'NtDuplicateObject': 3, 'DeviceIoControl': 1, 'GetVolumePathNameW': 1, 'RegCloseKey': 1, 'NtQueryKey': 2,'NtQueryValueKey': 6}, {'LdrUnloadDll': 1, 'LdrGetDllHandle': 2, 'NtCreateSection': 1, 'NtOpenKey': 3, 'LdrGetProcedureAddress': 4, 'SetUnhandledExceptionFilter': 5}]
The above are list of API calls extracted from 3 executable files during dynamic analysis.
I have tried to generate the data frame using the following line of code, but it is not giving me what I want.
api_frame = pd.DataFrame(apicalls)
I want the data frame that looks like the one below. kindly help.