Import or use csv data.

Fist of all, I am new in developing.

I want to use data from CSV files to process and use for calculation. I tried to use TabularData, but I don't know how and where to write to import or use the csv data. My file name is fnudos.csv.

import Foundation
import TabularData

Data = "fnudos.csv"

let nudos = try DataFrame(contentsOfCSVFile: policiesURL, rows: 0..<100)

print(nudos)

Something like that? But I don't have results.

Thanks in advance for your answers.

If you’re working with CSV files, the TabularData framework is most definitely your friend. If you’re not sure how to get started, check out the tiny example in this post.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Import or use csv data.
 
 
Q