title: Getting Error: "ValueError: If using all scalar values, you must pass an index" when converting ndarray to pandas Dataframe
body: <p>When transforming multiple <code>ndarray</code> to a <code>df</code> as per the code below</p>
  <pre><code>import  numpy as np
  import pandas as pd
  
  ls_a = ['TA', 'BAT', 'T']
  xxx = ['xx', 'cc']
  
  feature_no = len(ls_a)
  windows_no = len(xxx)
  
  
  sub_iti = np.repeat([['s1']], (feature_no * windows_no), axis=0).reshape(-1, 1)
  tw = np.repeat([xxx], feature_no, axis=1).reshape(-1, 1)
  col_iti = np.repeat([ls_a], windows_no, axis=0).reshape(-1, 1)
  
  df=pd.DataFrame ({'sub_iti': sub_iti,'tw': tw,'col_iti': col_iti})
  </code></pre>
  <p>, the compiler return an error</p>
  <blockquote>
  <p>ValueError: If using all scalar values, you must pass an index</p>
  </blockquote>
  <p>Based on <a href="https://stackoverflow.com/questions/17839973/constructing-pandas-dataframe-from-values-in-variables-gives-valueerror-if-usi">OP</a>, the argument <code>index</code> was inputed as below</p>
  <pre><code> df=pd.DataFrame (
               {'sub_iti': sub_iti,
                'tw': tw,
                'col_iti': col_iti},index=range(0,3*2) )
  </code></pre>
  <p>However, the compiler return diff rent error</p>
  <blockquote>
  <p>Exception: Data must be 1-dimensional</p>
  </blockquote>
  <p>May I know how to address this issue?</p>