# \#csv

**URL:** https://discourse.julialang.org/tag/csv/206.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Write CSV row by row](https://discourse.julialang.org/t/write-csv-row-by-row/138171)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 8\
**Last updated:** [September 17, 2026, 6:15pm UTC](https://discourse.julialang.org/t/write-csv-row-by-row/138171 "2026-09-17T18:15:14Z")

</div>

I have a computation that calculates rows of data, let’s say they are NamedTuples with the same keys. I would like to emit this into a CSV file without collecting or making it an iterable. ▶ Why? Pseudocode for what I wa…

---

## [Reading large CSV files](https://discourse.julialang.org/t/reading-large-csv-files/139061)

<div class="topic-metadata">

**Author:** [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Replies:** 9\
**Last updated:** [August 31, 2026, 11:56am UTC](https://discourse.julialang.org/t/reading-large-csv-files/139061 "2026-08-31T11:56:40Z")

</div>

Hi, is there any way to read a 88 GB csv file into a DataFrame? It kills julia, even with the -t auto option. Thanks!

---

## [Sending excel file as response is slow](https://discourse.julialang.org/t/sending-excel-file-as-response-is-slow/116705)

<div class="topic-metadata">

**Author:** [@Sandy45](https://discourse.julialang.org/u/Sandy45)\
**Replies:** 8\
**Last updated:** [August 29, 2026, 4:46pm UTC](https://discourse.julialang.org/t/sending-excel-file-as-response-is-slow/116705 "2026-08-29T16:46:40Z")

</div>

I have an API which get csv file in the request and all I need to do is format and send the response as excel file. I am reading the data into dataframe and directly writing into excel. The issue is that writing data in…

---

## [Read subset of columns from a CSV?](https://discourse.julialang.org/t/read-subset-of-columns-from-a-csv/138040)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 9\
**Last updated:** [July 10, 2026, 1:01pm UTC](https://discourse.julialang.org/t/read-subset-of-columns-from-a-csv/138040 "2026-07-10T13:01:51Z")

</div>

I have a dataset that contains several thousand gzipped CSV files each with a few hundred thousand lines. Using CSV.jl and CSV.File takes about 4 seconds, which is really good, but for the number of files till means ~3 h…

---

## [CSV.read with two delimiters](https://discourse.julialang.org/t/csv-read-with-two-delimiters/136685)

<div class="topic-metadata">

**Author:** [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Replies:** 3\
**Last updated:** [April 11, 2026, 11:04pm UTC](https://discourse.julialang.org/t/csv-read-with-two-delimiters/136685 "2026-04-11T23:04:47Z")

</div>

I have data where each row looks like this: 49, 127 97 136; CSV.read nicely imports it to a DataFrame like this: 49 127 97 136; But I don’t want the semicolon. Can this be imported in a better way? Thanks!

---

## [CSV.jl "corrupts" data when a field is very large](https://discourse.julialang.org/t/csv-jl-corrupts-data-when-a-field-is-very-large/133513)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 6\
**Last updated:** [October 30, 2025, 1:06pm UTC](https://discourse.julialang.org/t/csv-jl-corrupts-data-when-a-field-is-very-large/133513 "2025-10-30T13:06:08Z")

</div>

I have a CSV (from here) where one field is a MULTIPOLYGON that can be very large, and when I import it with CSV (even a smaller 10 rows version) I got a strange corruption: julia\> data = CSV.read("MYRIAD-HES/test.cs…

---

## [Reading csv files with missing lines](https://discourse.julialang.org/t/reading-csv-files-with-missing-lines/130853)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 2\
**Last updated:** [July 18, 2025, 5:45pm UTC](https://discourse.julialang.org/t/reading-csv-files-with-missing-lines/130853 "2025-07-18T17:45:35Z")

</div>

I have to read the following csv file: #Turbine Time(s) dt(s) nacelle yaw angle (degrees) 0 20000 0.5 255 1 20000 0.5 255 2 20000 0.5 255 3 20000 0.5 255 4 20000 0.5 255 5 20000 0.5 255 6 20000 0.5 255 7 20000 …

---

## [InexactError when saving compressed CSV file (but not if I save it uncompressed)](https://discourse.julialang.org/t/inexacterror-when-saving-compressed-csv-file-but-not-if-i-save-it-uncompressed/129784)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [June 10, 2025, 3:08pm UTC](https://discourse.julialang.org/t/inexacterror-when-saving-compressed-csv-file-but-not-if-i-save-it-uncompressed/129784 "2025-06-10T15:08:58Z")

</div>

x is a 15M x 243 DataFrame: julia\> x 14259735×243 DataFrame Row │ C R Y pr\_m1\_yl4 pr\_m2\_yl4 pr\_m3\_yl4 pr\_m4\_yl4 p ⋯ │ Int64 Int64 Int64 Float64 Float64 Float64 Float64 F…

---

## [New String7 type from result of CSV.file|\>DataFrame makes my function failing (which takes a String as input)](https://discourse.julialang.org/t/new-string7-type-from-result-of-csv-file-dataframe-makes-my-function-failing-which-takes-a-string-as-input/68985)

<div class="topic-metadata">

**Author:** [@jdad](https://discourse.julialang.org/u/jdad)\
**Replies:** 10\
**Last updated:** [June 7, 2025, 7:13am UTC](https://discourse.julialang.org/t/new-string7-type-from-result-of-csv-file-dataframe-makes-my-function-failing-which-takes-a-string-as-input/68985 "2025-06-07T07:13:37Z")

</div>

My script used to work till yesterday, but is now failing because of the following error ERROR: LoadError: MethodError: no method matching get\_symbols\_ta(::String7, ::String, ::String) Closest candidates are: get\_symb…

---

## [Type-stable reading from a file](https://discourse.julialang.org/t/type-stable-reading-from-a-file/125797)

<div class="topic-metadata">

**Author:** [@VictorSeven](https://discourse.julialang.org/u/VictorSeven)\
**Replies:** 14\
**Last updated:** [February 18, 2025, 2:44pm UTC](https://discourse.julialang.org/t/type-stable-reading-from-a-file/125797 "2025-02-18T14:44:30Z")

</div>

I was analysing some code today and I am unable to read information from a simple file while keeping type stability. I would like to pass the results to functions that have to be very optimized, so I believe this is an i…

---

## [CSV.jl writing quoted strings](https://discourse.julialang.org/t/csv-jl-writing-quoted-strings/123989)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 14\
**Last updated:** [December 19, 2024, 4:06pm UTC](https://discourse.julialang.org/t/csv-jl-writing-quoted-strings/123989 "2024-12-19T16:06:37Z")

</div>

I am wondering when CSV.write chooses to quote a field when writing a file. I know I can use quotestrings=true to force all strings to be quoted, but in my case that seems unnecessary and undesirable. I can read a CSV f…

---

## [Looking for a clean way to add a row in a DataFrame](https://discourse.julialang.org/t/looking-for-a-clean-way-to-add-a-row-in-a-dataframe/123891)

<div class="topic-metadata">

**Author:** [@dobby](https://discourse.julialang.org/u/dobby)\
**Replies:** 10\
**Last updated:** [December 18, 2024, 2:44pm UTC](https://discourse.julialang.org/t/looking-for-a-clean-way-to-add-a-row-in-a-dataframe/123891 "2024-12-18T14:44:24Z")

</div>

Hello, I am new to Julia, so please have mercy. I am reading multiple CSV files, where the rows are the same. But in order to distinguish the different files I’m reading, I have to add a row to indicate that. Here is …

---

## [Does CSV.read allow another process to keep writing to file?](https://discourse.julialang.org/t/does-csv-read-allow-another-process-to-keep-writing-to-file/122656)

<div class="topic-metadata">

**Author:** [@japhir](https://discourse.julialang.org/u/japhir)\
**Replies:** 6\
**Last updated:** [November 19, 2024, 10:00am UTC](https://discourse.julialang.org/t/does-csv-read-allow-another-process-to-keep-writing-to-file/122656 "2024-11-19T10:00:19Z")

</div>

I’m running a pretty expensive job on a cluster. This generates plaintext output files by appending new lines with data regularly (roughly once every second or so). I’ve written some julia code to perform quick visualiz…

---

## [Failing to import (relatively) large CSV file with Julia and VSC](https://discourse.julialang.org/t/failing-to-import-relatively-large-csv-file-with-julia-and-vsc/112350)

<div class="topic-metadata">

**Author:** [@etiennebert](https://discourse.julialang.org/u/etiennebert)\
**Replies:** 24\
**Last updated:** [September 22, 2024, 12:53pm UTC](https://discourse.julialang.org/t/failing-to-import-relatively-large-csv-file-with-julia-and-vsc/112350 "2024-09-22T12:53:54Z")

</div>

Hello everyone, I am completly new to Julia, so please my apologies if my question is trivial. I have quickly looked for the reply and I have not found it. I need to import a large matrix (40 000 x 40 000, app 6GB) int…

---

## [Closing files when using CSV.Rows](https://discourse.julialang.org/t/closing-files-when-using-csv-rows/29169)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 3\
**Last updated:** [September 9, 2024, 11:37pm UTC](https://discourse.julialang.org/t/closing-files-when-using-csv-rows/29169 "2024-09-09T23:37:20Z")

</div>

I’m using CSV.Rows to iterate through a very large CSV file. In base Julia, files that are opened with open should be closed with close (or you can use the do syntax instead). However, after perusing the CSV.jl docs, the…

---

## [Curious CSV round-trip problem](https://discourse.julialang.org/t/curious-csv-round-trip-problem/118334)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 11\
**Last updated:** [September 2, 2024, 10:17am UTC](https://discourse.julialang.org/t/curious-csv-round-trip-problem/118334 "2024-09-02T10:17:01Z")

</div>

(Apologies for a long post. There is a long set-up for this issue!) This website provides data on all the grants to good causes that the National Lottery has made since it began 30 years ago. It is possible to download …

---

## [Converting CSV to Parquet in Julia](https://discourse.julialang.org/t/converting-csv-to-parquet-in-julia/57328)

<div class="topic-metadata">

**Author:** [@oo92](https://discourse.julialang.org/u/oo92)\
**Replies:** 22\
**Last updated:** [August 11, 2024, 1:08pm UTC](https://discourse.julialang.org/t/converting-csv-to-parquet-in-julia/57328 "2024-08-11T13:08:25Z")

</div>

Hi. I have a simple dataframe that I want to convert to parquet. This is my attempt: begin df = CSV.read("/home/onur/julia-assignment/temp.csv", DataFrame) prq = Parquet.File(df) end But this is the error I’m gettin…

---

## [Reading text data: \`readdlm\` is deprecated, so how CSV package is used?](https://discourse.julialang.org/t/reading-text-data-readdlm-is-deprecated-so-how-csv-package-is-used/116955)

<div class="topic-metadata">

**Author:** [@ryofurue](https://discourse.julialang.org/u/ryofurue)\
**Replies:** 9\
**Last updated:** [July 17, 2024, 5:45pm UTC](https://discourse.julialang.org/t/reading-text-data-readdlm-is-deprecated-so-how-csv-package-is-used/116955 "2024-07-17T17:45:49Z")

</div>

In the issue tracker of DelimitedFiles I found a comment readdlm is also effectively deprecated and the CSV package should be used about reading text data files. I’m trying to read a plain text file listing numbe…

---

## [How to specify thousand separator with CSV.read data](https://discourse.julialang.org/t/how-to-specify-thousand-separator-with-csv-read-data/86890)

<div class="topic-metadata">

**Author:** [@Nikx](https://discourse.julialang.org/u/Nikx)\
**Replies:** 7\
**Last updated:** [June 16, 2024, 1:10am UTC](https://discourse.julialang.org/t/how-to-specify-thousand-separator-with-csv-read-data/86890 "2024-06-16T01:10:58Z")

</div>

My Excel spread uses apostrophes to separate thousands and even worse it uses" ’ " instead of straight apostroph e.g. 1’000. Is there a way to specify this in CSV.read()? Because when I import data it interprets 1’000 a…

---

## [Reading a file from line x to line y](https://discourse.julialang.org/t/reading-a-file-from-line-x-to-line-y/114363)

<div class="topic-metadata">

**Author:** [@Ju\_ska](https://discourse.julialang.org/u/Ju_ska)\
**Replies:** 28\
**Last updated:** [May 22, 2024, 12:28pm UTC](https://discourse.julialang.org/t/reading-a-file-from-line-x-to-line-y/114363 "2024-05-22T12:28:00Z")

</div>

Hi, I would like to read a portion of a lot of big files, as I know that the lines that interest me are located within line x and line y Currently, I load the files with CSV.File and read parts, but the loading overhea…

---

## [Creating an identifier column when combing multiple DataFrames with CSV.read](https://discourse.julialang.org/t/creating-an-identifier-column-when-combing-multiple-dataframes-with-csv-read/113013)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 2\
**Last updated:** [April 16, 2024, 5:59pm UTC](https://discourse.julialang.org/t/creating-an-identifier-column-when-combing-multiple-dataframes-with-csv-read/113013 "2024-04-16T17:59:16Z")

</div>

Suppose I have the following CSV files. df1 = DataFrame(A = 1:5, B = \["M", "F", "F", "M", "F"\]) df2 = DataFrame(A = 11:15, B = \["A", "B", "C", "D", "E"\]) df3 = DataFrame(A = 16:21, B = \["A", "B", "C", "D", "E","T"\]) …

---

## [Clarification on when order matters when reading multiple files with CSV.read?](https://discourse.julialang.org/t/clarification-on-when-order-matters-when-reading-multiple-files-with-csv-read/112970)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 4\
**Last updated:** [April 15, 2024, 11:03pm UTC](https://discourse.julialang.org/t/clarification-on-when-order-matters-when-reading-multiple-files-with-csv-read/112970 "2024-04-15T23:03:17Z")

</div>

When using CSV.read to read multiple CSV files into a single DataFrame. When does the order the files are listed makes a difference. @nilshg points out that this is an issue with pooled arrays and can be remedied by s…

---

## [Error when combining single row with multiple row CSV file into DataFrames](https://discourse.julialang.org/t/error-when-combining-single-row-with-multiple-row-csv-file-into-dataframes/111664)

<div class="topic-metadata">

**Author:** [@phantom](https://discourse.julialang.org/u/phantom)\
**Replies:** 6\
**Last updated:** [March 15, 2024, 8:48pm UTC](https://discourse.julialang.org/t/error-when-combining-single-row-with-multiple-row-csv-file-into-dataframes/111664 "2024-03-15T20:48:29Z")

</div>

Hi! I am combining several .csv files into DataFrames. Each file has uniform column numbers and data types. Everything works but when I try to combine a .csv file that contains a single row with one that contains mult…

---

## [CSV won't read tab separated file](https://discourse.julialang.org/t/csv-wont-read-tab-separated-file/111120)

<div class="topic-metadata">

**Author:** [@TimG](https://discourse.julialang.org/u/TimG)\
**Replies:** 23\
**Last updated:** [March 4, 2024, 6:06pm UTC](https://discourse.julialang.org/t/csv-wont-read-tab-separated-file/111120 "2024-03-04T18:06:09Z")

</div>

I have a large text file that describes itself as -- -- PostgreSQL database dump -- -- Dumped from database version 12.16 -- Dumped by pg\_dump version 12.16 It contains several blocks of tab-separated data which repre…

---

## [Skipping a lot of lines in CSV.read() allocates too much memory](https://discourse.julialang.org/t/skipping-a-lot-of-lines-in-csv-read-allocates-too-much-memory/110121)

<div class="topic-metadata">

**Author:** [@aris](https://discourse.julialang.org/u/aris)\
**Replies:** 77\
**Last updated:** [February 23, 2024, 11:30am UTC](https://discourse.julialang.org/t/skipping-a-lot-of-lines-in-csv-read-allocates-too-much-memory/110121 "2024-02-23T11:30:30Z")

</div>

Hello everyone, Consider the following example: using CSV, DataFrames number\_of\_lines = 10^4 CSV.write("data.csv", DataFrame(rand(number\_of\_lines,10), :auto)) steps = 20 chunk = round(Int,number\_of\_lines/steps) for …

---

## [Reading a few rows from a BIG CSV file](https://discourse.julialang.org/t/reading-a-few-rows-from-a-big-csv-file/68611)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 39\
**Last updated:** [January 18, 2024, 4:35pm UTC](https://discourse.julialang.org/t/reading-a-few-rows-from-a-big-csv-file/68611 "2024-01-18T16:35:17Z")

</div>

I’m reading a Census bureau CSV file that’s 2.2M rows long. I’d like to just read the first hundred rows to check my stuff works… df = Iterators.take(CSV.Rows("filename.csv"),100) |\> DataFrame Doesn’t terminate in any…

---

## [Read vector from data file](https://discourse.julialang.org/t/read-vector-from-data-file/108945)

<div class="topic-metadata">

**Author:** [@Matt\_jl](https://discourse.julialang.org/u/Matt_jl)\
**Replies:** 8\
**Last updated:** [January 18, 2024, 2:39pm UTC](https://discourse.julialang.org/t/read-vector-from-data-file/108945 "2024-01-18T14:39:05Z")

</div>

Hi I’m currently trying to read a vector from a .dat file. the structure of the file is not complicated and I currently managed to read the rows/columns that I need by using the following code: using DelimitedFiles fun…

---

## [Using CSV.read() to import data from a data input file into a DataFrame](https://discourse.julialang.org/t/using-csv-read-to-import-data-from-a-data-input-file-into-a-dataframe/77120)

<div class="topic-metadata">

**Author:** [@jjdegruijter](https://discourse.julialang.org/u/jjdegruijter)\
**Replies:** 27\
**Last updated:** [March 1, 2022, 7:38am UTC](https://discourse.julialang.org/t/using-csv-read-to-import-data-from-a-data-input-file-into-a-dataframe/77120 "2022-03-01T07:38:57Z")

</div>

In my homemade function ‘readdata()’ I have: Data = csv.read(filename; delim=‘,’, DataFrame) where ‘filename’ refers to one of my data inputfiles, named e.g. ‘instance.txt’. This resulted from my code in julia-1.0. W…

---

## [Importing only specific lines from large csv file](https://discourse.julialang.org/t/importing-only-specific-lines-from-large-csv-file/108672)

<div class="topic-metadata">

**Author:** [@aris](https://discourse.julialang.org/u/aris)\
**Replies:** 6\
**Last updated:** [January 11, 2024, 12:23pm UTC](https://discourse.julialang.org/t/importing-only-specific-lines-from-large-csv-file/108672 "2024-01-11T12:23:05Z")

</div>

Greetings everyone, I am dealing with a very large CSV file, and I would like to only read specific parts of it and import them as a matrix. Effectively, I want something like: using DelimitedFiles data = readdlm("myf…

---

## [Read text file containing proper CSV data chunks](https://discourse.julialang.org/t/read-text-file-containing-proper-csv-data-chunks/107828)

<div class="topic-metadata">

**Author:** [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Replies:** 11\
**Last updated:** [December 20, 2023, 3:00pm UTC](https://discourse.julialang.org/t/read-text-file-containing-proper-csv-data-chunks/107828 "2023-12-20T15:00:55Z")

</div>

I have a text file that contains comma-separated entries, and I am interested only in the rows that begin with the character A: file = """ C comment-1 B,9,5.5,20:30:33 A,2,1.5,20:31:15 C comment-2 A,0,0.5,22:57:00 C com…

[Next page](https://discourse.julialang.org/tag/csv/206.md?match_all_tags=true&page=1&tags%5B%5D=csv)
