How to read .tsv files in julia

I found somwhere this code:

s = "/Users/username/dir/data.tsv"
data = readtable(s)

But it seems like this doesn’t work. Do we have any other way?

Check DelimitedFiles

3 Likes

I’d use CSV.jl — it works with tab separated files just as well as commas, you just say your delim is tabs and/or spaces:

https://csv.juliadata.org/stable/examples.html#ignorerepeated_example

6 Likes