Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
338 B
5
Indexable
Never
object Main {
  def main(args: Array[String]): Unit = {
    val path = "C:\\Users\\User\\Documents\\Cours Data Engineering\\Java & Scala\\TP\\movies.csv"
    val buf = io.Source.fromFile(path)
    for(line <- buf.getLines()){
      val cols = line.split(",")
      cols.foreach(col => println(col))
    }
    buf.close()
  }
}