# CSV.read provide a valid sink error

**URL:** <https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878>\
**Category:** New to Julia\
**Tags:** question, error\
**Created:** [January 24, 2021, 9:18pm UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878 "2021-01-24T21:18:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jared\_shay](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Jared\_shay](https://discourse.julialang.org/u/Jared_shay)\
**Post date:** [January 24, 2021, 9:18pm UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/1 "2021-01-24T21:18:09Z")

</div>

I tried to read local csv files in julialang. To do so, I did the following from julia terminal (windows):

```julia
using CSV
df = CSV.read("C:\\Users\\adam\\data-example\\glass.csv")

```

but I got following error:

> ERROR: ArgumentError: provide a valid sink argument, like `using DataFrames; CSV.read(source, DataFrame)`  
> Stacktrace:  
> [1] read(::String, ::Nothing; copycols::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\Users\adam.julia\packages\CSV\la2cd\src\CSV.jl:43  
> [2] read(::String, ::Nothing) at C:\Users\adam.julia\packages\CSV\la2cd\src\CSV.jl:42 (repeats 2 times)  
> [3] top-level scope at REPL[18]:1

how should I read simple `.csv` file julia? Plus, I am wondering is there any IDE for julialang, like jupyter notebook for python or google colab that support julia? Can anyone point me out any idea for reading `.csv`?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [January 24, 2021, 9:27pm UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/2 "2021-01-24T21:27:28Z")

</div>

first, have you tried doing what the error msg suggests?

* * *

also please read the documentation:

```julia
CSV.File(path)

```

see also:

> [@CSV.read Error - provide a valid sink argument](https://discourse.julialang.org/t/csv-read-error-provide-a-valid-sink-argument/50157/11):
>
> The DataFrame one should be DataFrame(CSV.File(data\_file)) and still works. CSV.read used to work with a dataframe output as default, but was deprecated so CSV.jl doesn’t have to depend on DataFrames.jl It was then brought back as CSV.read(filepath, sink) as users were expecting a CSV.read function, and this structure means DataFrames only has to be loaded by the user if a DataFrame output is actually required.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [January 24, 2021, 9:29pm UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/3 "2021-01-24T21:29:24Z")

</div>

The error message gives you the solution. You want

```julia
using CSV, DataFrames
df = CSV.read("C:\\Users\\adam\\data-example\\glass.csv", DataFrame)

```

---

<div class="post-metadata">

**Author:** ![Jared\_shay](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Jared\_shay](https://discourse.julialang.org/u/Jared_shay)\
**Post date:** [January 25, 2021, 12:52am UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/4 "2021-01-25T00:52:15Z")

</div>

Thanks, this worked.

I am curious is there any IDE like jupyter notebook like IDE for experimenting julia code? is there anything similar to jupyter notebook for python? Any idea?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [January 25, 2021, 2:30am UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/5 "2021-01-25T02:30:12Z")

</div>

`Ju` in Jupyter stands for Julia. Checkout `IJulia.jl`.

Also, `Pluto.jl` is a good alternative.

If you’re look for real IDE, people use VC Code seems to be happy

---

<div class="post-metadata">

**Author:** ![Jared\_shay](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Jared\_shay](https://discourse.julialang.org/u/Jared_shay)\
**Post date:** [January 25, 2021, 2:55am UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/6 "2021-01-25T02:55:57Z")

</div>

could you share link or command I could install it from julia command line? like what we did for in python, pip install jupyter. Anything like that for julialang? Thanks!

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [January 25, 2021, 2:56am UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/7 "2021-01-25T02:56:44Z")

</div>

did you read Julia manual by any chance?  
[https://docs.julialang.org/en/v1/stdlib/Pkg/](https://docs.julialang.org/en/v1/stdlib/Pkg/)

---

<div class="post-metadata">

**Author:** ![Jared\_shay](https://avatars.discourse-cdn.com/v4/letter/j/958977/32.png) [@Jared\_shay](https://discourse.julialang.org/u/Jared_shay)\
**Post date:** [January 25, 2021, 3:09am UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/8 "2021-01-25T03:09:16Z")

</div>

yes, I did but not mentioned about `IJulia.jl`. Currently, I am doing simple julia coding from julia terminal. I bet there must be other cool IDE like jupyter notebook for python. I am sorry if I miss your point.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [January 25, 2021, 3:11am UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/9 "2021-01-25T03:11:18Z")

</div>

All you need to do to instiall IJulia is do `] add IJulia`. The docs show you how to add packages. IJulia is a package just like everything else

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [January 25, 2021, 3:31am UTC](https://discourse.julialang.org/t/csv-read-provide-a-valid-sink-error/53878/10 "2021-01-25T03:31:01Z")

</div>

[https://github.com/JuliaLang/IJulia.jl#quick-start](https://github.com/JuliaLang/IJulia.jl#quick-start)
