title: Import a breaked matrix from file with python
body: <p>I found myself trying to find an easier way to solve this problem, for which I've been using loops.</p>
  
  <p>I have a txt file that contains a matrix in the form:</p>
  
  <pre><code>    a       b       c        d       e
  a value1 
  b value2  value3
  c value4  value5  value6
  d value7  value8  value9  value10
  e value11 value12 value13 value14 value15
  f value16 value17 value18 value19 value20
  g value21 value22 value23 value24 value25
  
      f      g
  f value26 
  g value27 value28
  </code></pre>
  
  <p>I would like to create a Dataframe (of g x g) in a faster and more elegant way than loops (if there is one).</p>
  
  <p>If possible I would like to actually have a column in the way:</p>
  
  <pre><code>index  value 
   a-a   value1
   a-b   value2
   a-c   value4
   a-d   value7
   a-e   value11
   a-f   value16
   a-g   value21
   b-b   value3
   b-c   value5
   b-d   value8
   b-e   value12
   b-f   value17
   b-g   value22
   c-c   value6
  </code></pre>
  
  <p>and so on</p>
  
  <p>This is due to the fact that the Dataframe should be from several files to have one next to the other (and the value header should be the filename)</p>
  
  <p>Any insight would be much appreciated :)</p>