# How to read a compressed CSV file?

**URL:** <https://discourse.julialang.org/t/how-to-read-a-compressed-csv-file/19719>\
**Category:** New to Julia\
**Created:** [January 16, 2019, 7:25pm UTC](https://discourse.julialang.org/t/how-to-read-a-compressed-csv-file/19719 "2019-01-16T19:25:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [January 16, 2019, 11:45pm UTC](https://discourse.julialang.org/t/how-to-read-a-compressed-csv-file/19719/4 "2019-01-16T23:45:15Z")

</div>

> [@davidanthoff](#):
>
> If they are gz compressed, you can read them directly with [CSVFiles.jl](https://github.com/queryverse/CSVFiles.jl), see [here](https://github.com/queryverse/CSVFiles.jl/issues/33). But that won’t work for 7z compression, I’m afraid…

Can’t you do

```julia-auto
myDT = open(`7z e -y -bso0 -so mycompress.7z`, "r") do io
    load(Stream(format"CSV", io)) |> DataFrame
end

```

to load it from a pipe just like in R?

---

_[View the full topic](https://discourse.julialang.org/t/how-to-read-a-compressed-csv-file/19719)._
