Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix documentation examples #1946

Merged
merged 3 commits into from
Sep 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/man/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ using CSV

A dataset can now be read from a CSV file at path `input` using
```julia
CSV.read(input)
DataFrame(CSV.File(input))
```

A `DataFrame` can be written to a CSV file at path `output` using
Expand All @@ -621,4 +621,4 @@ df = DataFrame(x = 1, y = 2)
CSV.write(output, df)
```

The behavior of CSV functions can be adapted via keyword arguments. For more information, see `?CSV.read` and `?CSV.write`, or checkout the online [CSV.jl documentation](https://juliadata.github.io/CSV.jl/stable/).
The behavior of CSV functions can be adapted via keyword arguments. For more information, see `?CSV.File`, `?CSV.read` and `?CSV.write`, or checkout the online [CSV.jl documentation](https://juliadata.github.io/CSV.jl/stable/).
4 changes: 3 additions & 1 deletion docs/src/man/reshaping_and_pivoting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Reshape data from wide to long format using the `stack` function:
```jldoctest reshape
julia> using DataFrames, CSV

julia> iris = CSV.read(joinpath(dirname(pathof(DataFrames)), "../docs/src/assets/iris.csv"));
julia> iris = DataFrame(CSV.File(joinpath(dirname(pathof(DataFrames)), "../docs/src/assets/iris.csv")));

julia> first(iris, 6)
6×5 DataFrame
Expand Down Expand Up @@ -305,6 +305,8 @@ This repeats the original columns N times where N is the number of columns stack
None of these reshaping functions perform any aggregation. To do aggregation, use the split-apply-combine functions in combination with reshaping. Here is an example:

```jldoctest reshape
julia> using Statistics

julia> d = melt(iris, :Species);

julia> first(d, 6)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/man/sorting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Sorting is a fundamental component of data analysis. Basic sorting is trivial: j
```jldoctest sort
julia> using DataFrames, CSV

julia> iris = CSV.read(joinpath(dirname(pathof(DataFrames)), "../docs/src/assets/iris.csv"));
julia> iris = DataFrame(CSV.File(joinpath(dirname(pathof(DataFrames)), "../docs/src/assets/iris.csv")));

julia> first(iris, 4)
4×5 DataFrame
Expand Down
2 changes: 1 addition & 1 deletion docs/src/man/split_apply_combine.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ We show several examples of the `by` function applied to the `iris` dataset belo
```jldoctest sac
julia> using DataFrames, CSV, Statistics

julia> iris = CSV.read(joinpath(dirname(pathof(DataFrames)), "../docs/src/assets/iris.csv"));
julia> iris = DataFrame(CSV.File(joinpath(dirname(pathof(DataFrames)), "../docs/src/assets/iris.csv")));

julia> first(iris, 6)
6×5 DataFrame
Expand Down