title: Nested dictionary with dataframes to dataframe in pandas
body: <p>I know that there are a few questions about nested dictionaries to dataframe but their solutions do not work for me. I have a dataframe, which is contained in a dictionary, which is contained in another dictionary, like this:</p>
  
  <pre><code>df1 = pd.DataFrame({'2019-01-01':[38],'2019-01-02':[43]},index = [1,2])
  df2 = pd.DataFrame({'2019-01-01':[108],'2019-01-02':[313]},index = [1,2])
  da = {}
  da['ES']={}
  da['ES']['TV']=df1
  da['ES']['WEB']=df2
  </code></pre>
  
  <p>What I want to obtain is the following: </p>
  
  <pre><code>df_final = pd.DataFrame({'market':['ES','ES','ES','ES'],'device':['TV','TV','WEB','WEB'],
                       'ds':['2019-01-01','2019-01-02','2019-01-01','2019-01-02'],
                       'yhat':[43,38,423,138]})
  </code></pre>
  
  <p>Getting the code from another SO question I have tried this:</p>
  
  <pre><code>market_ids = []
  frames = []
  for market_id,d in da.items():
    market_ids.append(market_id)
    frames.append(pd.DataFrame.from_dict(da,orient = 'index'))    
  df = pd.concat(frames, keys=market_ids)
  </code></pre>
  
  <p>Which gives me a dataframe with multiple indexes and the devices as column names.</p>
  
  <p>Thank you</p>