Let's say I have a JSON or a dictionary. I would like to generate an easy, human-readable Excel report out of it.
{'A1':
{'B1': 'XX1',
'B2': 'XX2',
'B3': 'XX4',
'B4': {'C1': 'XX000'},
'B8': 'XX5'
}
...
}
How do I create a dataframe (more specifically an Excel report) that looks like this:
A1
B1 XX1
B2 XX2
B3 XX4
B4 C1 XX000
B8 XX5
Excel final Output:
Any ideas welcome! Assume that this is a multi-index JSON/dictionary and needs to be dynamically developed.
I have some basic code that returns me metadata containing tree-path, sub-depth, etc. but this is not getting me too far. Any suggestions?
Essentially, I need to create the opposite of this: How to generate n-level hierarchical JSON from pandas DataFrame?