Skip to content

Commit 7de4228

Browse files
authored
Add an overall module docstring (#934)
1 parent fb33d39 commit 7de4228

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/CSV.jl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
"""
2+
CSV provides fast, flexible reader & writer for delimited text files in various formats.
3+
4+
Reading:
5+
- `CSV.File` reads delimited data and returns a `CSV.File` object, which allows dot-access to columns and iterating rows.
6+
- `CSV.read` is similar to `CSV.File` but used when the input will be passed directly to a sink function such as a `DataFrame`.
7+
- `CSV.Rows` reads delimited data and returns a `CSV.Rows` object, which allows "streaming" the data by iterating and thereby has a lower memory footprint than `CSV.File`.
8+
- `CSV.Chunks` allows processing extremely large files in "batches" or "chunks".
9+
Writing:
10+
- `CSV.write` writes a [Tables.jl interface input](https://github.com/JuliaData/Tables.jl) such as a `DataFrame` to a csv file or an in-memory IOBuffer.
11+
- `CSV.RowWriter` creates an iterator that produces csv-formatted strings for each row in the input table.
12+
Here is an example of reading a csv file and passing the input to a `DataFrame`:
13+
```julia
14+
using CSV, DataFrames
15+
ExampleInputDF = CSV.read("ExampleInputFile.csv", DataFrame)
16+
```
17+
Here is an example of writing out a `DataFrame` to a csv file:
18+
```julia
19+
using CSV, DataFrames
20+
ExampleOutputDF = DataFrame(rand(10,10), :auto)
21+
CSV.write("ExampleOutputFile.csv", ExampleOutputDF)
22+
```
23+
"""
124
module CSV
225

326
if !isdefined(Base, :contains)

0 commit comments

Comments
 (0)