tell me the difference between reading a file from a csv or a pipe into julia?

df = CSV.read("data.csv");

is currently a shorthand for:

df = CSV.read("data.csv", DataFrame);

(in the future the former will be disallowed most likely)

I am not sure where you have seen:

df = CSV.read("data.csv") |> DataFrame;

as this is not needed. You create an unnecessary additional copy of your data frame.

Probably you meant:

df = CSV.File("data.csv") |> DataFrame;

which is a low-level API of CSV.jl.

In short. It is recommended to use:

df = CSV.read("data.csv", DataFrame);

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top