title: Converting pyspark to scala: Reading multiple directories
body: <p>I have a list of files in parquet format that I load and merge into one single dataframe in PySpark. </p>
  
  <pre><code>paths = ['file1', 'file2', 'file3']
  df_list = map(lambda x:(spark.read.parquet(x)), paths)
  df = reduce(lambda df1, df2: df1.unionAll(df2), df_list)
  </code></pre>
  
  <p>I would like to do the same operation using Scala. However when I using map operation on a <strong>Scala list of paths</strong></p>
  
  <pre><code>val df_list = map(x = &gt; (spark.read.parquet(x)), paths)
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <blockquote>
    <p>:139: error: overloaded method value parquet with
    alternatives:   (paths: String*)org.apache.spark.sql.DataFrame <br>
    (path: String)org.apache.spark.sql.DataFrame  cannot be applied to
    (List[String])
           val df_list = map(x = > (spark.read.parquet(x)), paths)</p>
  </blockquote>
  
  <p>Any suggestion to resolve the issue will be appreciated.</p>