Skip to content

Commit

Permalink
Add an overall module docstring (#934)
Browse files Browse the repository at this point in the history
  • Loading branch information
Junxiao-Hou authored Oct 21, 2021
1 parent fb33d39 commit 7de4228
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/CSV.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
"""
CSV provides fast, flexible reader & writer for delimited text files in various formats.
Reading:
- `CSV.File` reads delimited data and returns a `CSV.File` object, which allows dot-access to columns and iterating rows.
- `CSV.read` is similar to `CSV.File` but used when the input will be passed directly to a sink function such as a `DataFrame`.
- `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`.
- `CSV.Chunks` allows processing extremely large files in "batches" or "chunks".
Writing:
- `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.
- `CSV.RowWriter` creates an iterator that produces csv-formatted strings for each row in the input table.
Here is an example of reading a csv file and passing the input to a `DataFrame`:
```julia
using CSV, DataFrames
ExampleInputDF = CSV.read("ExampleInputFile.csv", DataFrame)
```
Here is an example of writing out a `DataFrame` to a csv file:
```julia
using CSV, DataFrames
ExampleOutputDF = DataFrame(rand(10,10), :auto)
CSV.write("ExampleOutputFile.csv", ExampleOutputDF)
```
"""
module CSV

if !isdefined(Base, :contains)
Expand Down

0 comments on commit 7de4228

Please sign in to comment.