title: Spark Scala - How to initialise an empty dataframe with 1000 columns
body: <p>I want to initialise an empty DataFrame in Spark (Scala).
  The number of columns in the DataFrame has to be 1000 and an additional Label column, and initially the dataframe should be empty.</p>
  
  <p>While inserting new Rows to the DataFrame, I have to insert values in only specific columns based on list values.</p>
  
  <p>If my List is
  <code>val myList = List(List(4), List(2,3,6), List(5,8)...)</code></p>
  
  <p>I want my dataframe to contain values like this:</p>
  
  <p><code>Id col1 col2 col3 col4 col5 col6 col7 col8.... col1000 Label
   1  0     0     0    1    0   0    0    0          0     x
   2  0     1     1    0    0   1    0    0          0     y
   3  0     0     0    0    1   0    0    1          0     x
   ....</code> </p>
  
  <p>Any approach how I could proceed on this?</p>