# CSV.read Error - provide a valid sink argument

**URL:** <https://discourse.julialang.org/t/csv-read-error-provide-a-valid-sink-argument/50157>\
**Category:** General Usage\
**Tags:** csv\
**Created:** [November 14, 2020, 7:27pm UTC](https://discourse.julialang.org/t/csv-read-error-provide-a-valid-sink-argument/50157 "2020-11-14T19:27:27Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [November 19, 2020, 6:50am UTC](https://discourse.julialang.org/t/csv-read-error-provide-a-valid-sink-argument/50157/11 "2020-11-19T06:50:11Z")

</div>

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.

---

_[View the full topic](https://discourse.julialang.org/t/csv-read-error-provide-a-valid-sink-argument/50157)._
