Obtaining a pandas dataframe from a dict with tuples as keys
<p>I am new to python and have been struggling with this problem for quite a while. I have a dict like this:</p>

<p><code>dict1 = {(a,a) : 5, (a,b) :10, (a,c) : 11, (b,a): 4, (b,b) : 8, (b,c) : 3....}</code></p>

<p>What I would like to do is convert this into a pandas dataframe that looks like this:</p>

<pre><code>    a    b    c
a   5    10   11
b   4    8    3
c   ..   ..   ..
</code></pre>

<p>After that I would like to create a multiple bar plot in the jupyter notebook. I know you can display the data as a pandas series to show the following:</p>

<pre><code>dataset = pd.Series(dict1)
print dataset
    a  a  5
       b  10
       c  11
    b  a  4
       b  8
       c  3
    c  a  ..
       b  ..
       c  ..
</code></pre>

<p>However, I was not able to create a multiple bar plot from that.</p>