title: Tuples of arrays 1D and 2D to dataframe with python
body: <p>This is what a model.predic returns. ¿How can i convert this tuple in columns of a dataframe?</p>
  
  <pre><code>(array([1., 1., 1., ..., 1., 1., 1.]), array([[0.46502338, 0.53497662],
          [0.47072865, 0.52927135],
          [0.4696557 , 0.5303443 ],
          ...,
          [0.47139825, 0.52860175],
          [0.46367829, 0.53632171],
          [0.46586898, 0.53413102]]))
  &lt;class 'tuple'&gt;
  </code></pre>
  
  <p>Nothing of those is working for me</p>
  
  <pre><code>pd.DataFrame(dict(class_pred=tuple[0], prob_0=tuple[1], prob_1=tuple[2]))
  pd.DataFrame(np.column_stack(tuple),columns=['class_pred','prob_0','prob_1'])
  </code></pre>
  
  <p>I would like to obtain something like this:</p>
  
  <pre><code>class_pred  prob_0    prob_1
  1           0.470728  0.5292713
  </code></pre>
  
  <p>AniSkywalker solution works perfectly.</p>
  
  <pre><code>type(data)
  print(data)
  
  tuple
  (array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1.]),
   array([[0.46502338, 0.53497662],
          [0.47072865, 0.52927135],
          [0.4696557 , 0.5303443 ],
          [0.46511921, 0.53488079],
          [0.46739934, 0.53260066],
          [0.47387646, 0.52612354],
          [0.4737461 , 0.5262539 ],
          [0.47052631, 0.52947369],
          [0.47658316, 0.52341684],
          [0.47222654, 0.52777346]]))
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>df_pred = pd.DataFrame(data=dict(pred=data[0], prob_0=data[1][:,0], prob_1=data[1][:,1]))
  </code></pre>
  
  <pre><code>print(df_pred)
  
      pred    prob_0      prob_1
  0   1.0     0.465023    0.534977
  1   1.0     0.470729    0.529271
  2   1.0     0.469656    0.530344
  3   1.0     0.465119    0.534881
  4   1.0     0.467399    0.532601
  5   1.0     0.473876    0.526124
  6   1.0     0.473746    0.526254
  7   1.0     0.470526    0.529474
  8   1.0     0.476583    0.523417
  9   1.0     0.472227    0.527773
  </code></pre>