title: multiindex dataframe from nested dictionary of sets
body: <p>I have a nested dictionary of sets of dates, d</p>
  
  <pre><code>d= {"A": {'a': {datetime1, datetime2}, 'b': {datetime3}, 'c':{datetime4},
      "B": {'a': datetime5, datetime1, datetime3}}
  </code></pre>
  
  <p>I want a pandas DataFrame df</p>
  
  <pre><code>          dates   
  A    a    datetime1
            datetime2
       b    datetime3
            ...
  </code></pre>
  
  <p>This might be a duplicate question of
  <a href="https://stackoverflow.com/questions/24988131/nested-dictionary-to-multiindex-dataframe-where-dictionary-keys-are-column-label">Nested dictionary to multiindex dataframe where dictionary keys are column labels</a></p>
  
  <p>However, I couldn't get the advise given in that question to work here, so I dare to repost the question. (However, I have previously successfully used methods in that question on other nested dictionaries). So, doing something like </p>
  
  <pre><code>df = pd.DataFrame.from_dict({(i, j): d[i][j]
                                       for i in d.keys()
                                       for j in d[i].keys()},
                                       orient='index')
  </code></pre>
  
  <p>creates a mess of thousands of integers as columns (one for each date maybe?), and tuple (i,j) as a single index (instead of two levels of indexes, i and j). Is the problem simply because here I have only one column in the dataframe? Can't I have a multiindexed series? Or am I missing something very obvious?</p>