I have a complex dict with various "depth" in which values are stored. The structure looks like this:

```
{
   "key1":"value1",
   "key2":[
      {
         "key2.1a":"value2.1a",
         "key2.2a":"value2.2a",
         "key2.3a":{
            "keya2.3.1a":"value2.3.1a"
         },     
         "key2.4a":"value2.4a",
         "key2.5a":"value2.5a",
         "key2.6a":"value2.6a",
         "key2.7a":"value2.7a",
         "key2.8a":"value2.8a",
         "key2.9a":"value2.9a",
         "key2.10a":{
            "key2.10.1a":"value2.10.1a",
            "key2.10.2a":"value2.10.2a",
            "key2.10.3a":"value2.10.3a",
            "key2.10.4a":{
               "key2.10.4.1a":"value2.10.4.1a"
            }
         },
         "key2.11a":{
            "key2.11.1a":"value2.11.1a",
            "key2.11.2a":"value2.11.2a"
         },
         "key2.12a":"value2.12a",
         "key2.13a":"value2.13a"
      },
      {
         "key2.1b":"value2.1b",
         "key2.2b":"value2.2b",
         "key2.3b":{
            "keya2.3.1b":"value2.3.1b"
         },     
         "key2.4b":"value2.4b",
         "key2.5b":"value2.5b",
         "key2.6b":"value2.6b",
         "key2.7b":"value2.7b",
         "key2.8b":"value2.8b",
         "key2.9b":"value2.9b",
         "key2.10b":{
            "key2.10.1b":"value2.10.1b",
            "key2.10.2b":"value2.10.2b",
            "key2.10.3b":"value2.10.3b",
            "key2.10.4b":{
               "key2.10.4.1b":"value2.10.4.1b"
            }
         },
         "key2.11b":{
            "key2.11.1b":"value2.11.1b",
            "key2.11.2b":"value2.11.2b"
         },
         "key2.12b":"value2.12b",
         "key2.13b":"value2.13b"
      }
      ]
    "key3":"value3"
}

```

The numbers represent the "depth" of the tree, and the letters ("a" and "b") are separate records.

I wanted to have a DataFrame with hierarchically indexed columns that looks more or less like that:
[![enter image description here](https://i.stack.imgur.com/GqHT1.png)](https://i.stack.imgur.com/GqHT1.png)

For now I tried to use MultiIndex for columns:

```
columns = pd.MultiIndex.from_product([["key1", "key2", "key3"], ["key2.1","key2.2","key2.3"]])
df = pd.DataFrame(dict, columns = columns)

```

but it gives me an empty DataFrame. Is there a way to specify a "path" for each of the columns?