# Export csv - CSV.jl and CSVFiles do not help

**URL:** <https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900>\
**Category:** General Usage\
**Created:** [October 4, 2018, 8:26pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900 "2018-10-04T20:26:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [October 4, 2018, 8:26pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/1 "2018-10-04T20:26:24Z")

</div>

Hi,

I have a 90000 x 414 DataFrame I need to export to Stats. I tried saving it as csv using CSV and CSVFiles but Julia gets stuck and I have to stop it. This happens even if I try with many fewer rows.

Any advice? Including other formats that stata can read.

thanks

---

<div class="post-metadata">

**Author:** ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)\
**Post date:** [October 4, 2018, 8:32pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/2 "2018-10-04T20:32:58Z")

</div>

Is there any way you could share the file? I’m happy to help take a look for CSV.jl (I’m the primary author). Also, are you running the latest versions?

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [October 4, 2018, 9:26pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/3 "2018-10-04T21:26:44Z")

</div>

Ditto with respect to [CSVFiles.jl](https://github.com/queryverse/CSVFiles.jl), happy to look into this if we can find some way to replicate it. Maybe you could save the data as a feather file and post that somewhere?

I just tried to save a generic 90000x414 `DataFrame` with random `Float64`s with [CSVFiles.jl](https://github.com/queryverse/CSVFiles.jl), and that worked. It took 10s, on my machine (which has a fast processor and a fast SSD).

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [October 5, 2018, 2:42pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/4 "2018-10-05T14:42:33Z")

</div>

Unfortunately there is data I cannot share. Any idea about what I can do? The package works for very small files. And it is the latest version. When I used it on Julia 0.6 a couple of months ago, it was working with a slightly smaller DataFrame. Now even that DataFrame would not work.

Here is what is shows when I do head(df). It looks weird. Does it help?  
.

 ![30%20AM](https://global.discourse-cdn.com/julialang/original/3X/4/0/40c1395394c467595b6affba6f903c86013ac8dd.png)

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [October 5, 2018, 6:08pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/5 "2018-10-05T18:08:59Z")

</div>

Could you show us the output of running ` typeof.(DataFrames.columns(df))`? The screenshot you are showing there looks weird and makes me wonder whether some unusual type is used for the column elements.

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [October 5, 2018, 6:22pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/6 "2018-10-05T18:22:48Z")

</div>

DataType[240]  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
…  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Union{Missing, Float32}}  
Vector{Int64}  
Vector{Int64}  
Vector{Int64}  
Vector{Int64}  
Vector{Int64}  
Vector{Int64}

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [October 5, 2018, 6:23pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/7 "2018-10-05T18:23:43Z")

</div>

I don’t know what those weird vectors are. I will look into them.

---

<div class="post-metadata">

**Author:** ![Juser](https://avatars.discourse-cdn.com/v4/letter/j/34f0e0/32.png) [@Juser](https://discourse.julialang.org/u/Juser)\
**Post date:** [October 5, 2018, 6:24pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/8 "2018-10-05T18:24:20Z")

</div>

Perhaps better would be to give a list of column types without duplicates in case column 146 is the problem, in which case it’s going to be missed by the output above.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [October 5, 2018, 6:38pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/9 "2018-10-05T18:38:04Z")

</div>

I just got confused by the `[90m` parts in the screenshot. Those seem to appear in the first columns already, so I think this is maybe a wrong lead to figure out what is going on…

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [October 5, 2018, 7:50pm UTC](https://discourse.julialang.org/t/export-csv-csv-jl-and-csvfiles-do-not-help/15900/10 "2018-10-05T19:50:04Z")

</div>

The `[90m` parts are due to incorrect handling of colors by the terminal. The data looks OK.
