title: dictionary containing arrays and matrices to pandas dataframe
body: <p>I have a dictionary <code>a</code> that looks like this:</p>
  
  <pre><code>a = {}
  a['first_variable']=np.array([1,2,3,4,5])
  a['second_variable']=np.array([[1,2],[3,4],[5,6],[7,8],[9,10]])
  </code></pre>
  
  <p>As you can see some keys contain an array, other a matrix...</p>
  
  <p>Given this  dictionary, I would like to create a dataframe that looks like this</p>
  
  <pre><code>a_dataframe = pd.DataFrame(columns=['first_variable','second_variable_col1','second_variable_col2'])
  a_dataframe['first_variable']=np.array([1,2,3,4,5])
  a_dataframe['second_variable_col1']=np.array([1,3,5,7,9])
  a_dataframe['second_variable_col2']=np.array([2,4,6,8,10])
  </code></pre>
  
  <p>This should be done in an automatic fashion...ie taking the names from the dictionary keys and in case of a matrix add col1, col2, etc...</p>
  
  <p>Can you help me?
  Thanks</p>