title: Printing dictionary as table with header in vertical column
body: <p>I am quite new to Python and still figuring out how to use formatting properly.
  I have a bunch of data in a dictionary that I want to print as a table with headers in the left column. I did a lot of searching (not sure if the right terminology is vertical table or horizontal table) but most results I found have the header in the top row.
  Using PrettyTable and others I can still print the data as</p>
  <pre><code>+-------+------+------------+
  | index | type |      name  |
  +-------+------+------------+
  |   1   |  0   | username_1 |
  |   2   |  1   | username_2 |
  +-------+------+------------+
  </code></pre>
  <p>but I would like to invert it like so:</p>
  <pre><code>index   1            2
  type    0            1
  name    username_1   username_2
  </code></pre>
  <p>Is there a generic way in which I can achieve this?</p>