I have several dictionaries set up as follows:
Dict1 = {'Orange': ['1', '2', '3', '4']}
Dict2 = {'Red': ['3', '4', '5']}
And I'd like the output to be one combined dataframe:
| Type | Value |
|--------------|
|Orange| 1 |
|Orange| 2 |
|Orange| 3 |
|Orange| 4 |
| Red | 3 |
| Red | 4 |
| Red | 5 |
I tried splitting everything out but I only get Dict2 in this dataframe.
mydicts = [Dict1, Dict2]
for x in mydicts:
for k, v in x.items():
df = pd.DataFrame(v)
df['Type'] = k