Skip to content

Commit 39c04ac

Browse files
authored
update docs following CSV.jl 0.9 release (#2865)
1 parent d8add19 commit 39c04ac

File tree

8 files changed

+449
-436
lines changed

8 files changed

+449
-436
lines changed

docs/src/man/basics.md

Lines changed: 398 additions & 390 deletions
Large diffs are not rendered by default.

docs/src/man/querying_frameworks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ The major benefit of the package is that it allows you to refer to columns of a
2424
expressions. Additionally you can chain a sequence of transformations of a
2525
`DataFrame` using the `@linq` macro.
2626

27-
When a DataFramesMeta.jl macro such as `@select`, `@transform`, `@by`, `@combine`,
27+
When a DataFramesMeta.jl macro such as `@select`, `@transform`, `@by`, `@combine`,
2828
`@where`, or `@orderby` is called inside a `@linq` block, you can omit
2929
the `@`. Therefore `transform` inside `@linq` is not the same as `transform`
30-
outside of a `@linq` block.
30+
outside of a `@linq` block.
3131

3232
Here is a minimal example of usage of the package. Observe that we refer to
3333
names of columns using only their names and that chaining is performed using the

docs/src/man/reshaping_and_pivoting.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ julia> iris = CSV.read((joinpath(dirname(pathof(DataFrames)),
1010
DataFrame)
1111
150×5 DataFrame
1212
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
13-
│ Float64 Float64 Float64 Float64 String
13+
│ Float64 Float64 Float64 Float64 String15
1414
─────┼──────────────────────────────────────────────────────────────────
1515
1 │ 5.1 3.5 1.4 0.2 Iris-setosa
1616
2 │ 4.9 3.0 1.4 0.2 Iris-setosa
@@ -33,7 +33,7 @@ julia> iris = CSV.read((joinpath(dirname(pathof(DataFrames)),
3333
julia> stack(iris, 1:4)
3434
600×3 DataFrame
3535
Row │ Species variable value
36-
String String Float64
36+
String15 String Float64
3737
─────┼──────────────────────────────────────
3838
1 │ Iris-setosa SepalLength 5.1
3939
2 │ Iris-setosa SepalLength 4.9
@@ -62,7 +62,7 @@ be given:
6262
julia> stack(iris, [:SepalLength, :SepalWidth, :PetalLength, :PetalWidth])
6363
600×3 DataFrame
6464
Row │ Species variable value
65-
String String Float64
65+
String15 String Float64
6666
─────┼──────────────────────────────────────
6767
1 │ Iris-setosa SepalLength 5.1
6868
2 │ Iris-setosa SepalLength 4.9
@@ -100,7 +100,7 @@ the long format:
100100
julia> stack(iris, [:SepalLength, :SepalWidth], :Species)
101101
300×3 DataFrame
102102
Row │ Species variable value
103-
String String Float64
103+
String15 String Float64
104104
─────┼──────────────────────────────────────
105105
1 │ Iris-setosa SepalLength 5.1
106106
2 │ Iris-setosa SepalLength 4.9
@@ -127,7 +127,7 @@ If you prefer to specify the id columns then use `Not` with `stack` like this:
127127
julia> stack(iris, Not(:Species))
128128
600×3 DataFrame
129129
Row │ Species variable value
130-
String String Float64
130+
String15 String Float64
131131
─────┼──────────────────────────────────────
132132
1 │ Iris-setosa SepalLength 5.1
133133
2 │ Iris-setosa SepalLength 4.9
@@ -159,7 +159,7 @@ julia> iris.id = 1:size(iris, 1)
159159
julia> longdf = stack(iris, Not([:Species, :id]))
160160
600×4 DataFrame
161161
Row │ Species id variable value
162-
String Int64 String Float64
162+
String15 Int64 String Float64
163163
─────┼─────────────────────────────────────────────
164164
1 │ Iris-setosa 1 SepalLength 5.1
165165
2 │ Iris-setosa 2 SepalLength 4.9
@@ -209,7 +209,7 @@ If the remaining columns are unique, you can skip the id variable and use:
209209
julia> unstack(longdf, :variable, :value)
210210
150×6 DataFrame
211211
Row │ Species id SepalLength SepalWidth PetalLength PetalWidth ⋯
212-
String Int64 Float64? Float64? Float64? Float64? ⋯
212+
String15 Int64 Float64? Float64? Float64? Float64? ⋯
213213
─────┼──────────────────────────────────────────────────────────────────────────
214214
1 │ Iris-setosa 1 5.1 3.5 1.4 0.2 ⋯
215215
2 │ Iris-setosa 2 4.9 3.0 1.4 0.2
@@ -236,7 +236,7 @@ arguments, as they will be used by default, and write:
236236
julia> unstack(longdf)
237237
150×6 DataFrame
238238
Row │ Species id SepalLength SepalWidth PetalLength PetalWidth ⋯
239-
String Int64 Float64? Float64? Float64? Float64? ⋯
239+
String15 Int64 Float64? Float64? Float64? Float64? ⋯
240240
─────┼──────────────────────────────────────────────────────────────────────────
241241
1 │ Iris-setosa 1 5.1 3.5 1.4 0.2 ⋯
242242
2 │ Iris-setosa 2 4.9 3.0 1.4 0.2
@@ -264,7 +264,7 @@ the original wide data frame. Here is an example:
264264
julia> stack(iris, view=true)
265265
600×4 DataFrame
266266
Row │ Species id variable value
267-
String Int64 String Float64
267+
String15 Int64 String Float64
268268
─────┼─────────────────────────────────────────────
269269
1 │ Iris-setosa 1 SepalLength 5.1
270270
2 │ Iris-setosa 2 SepalLength 4.9
@@ -306,7 +306,7 @@ julia> using Statistics
306306
julia> d = stack(iris, Not(:Species))
307307
750×3 DataFrame
308308
Row │ Species variable value
309-
String String Float64
309+
String15 String Float64
310310
─────┼──────────────────────────────────────
311311
1 │ Iris-setosa SepalLength 5.1
312312
2 │ Iris-setosa SepalLength 4.9
@@ -329,7 +329,7 @@ julia> d = stack(iris, Not(:Species))
329329
julia> x = combine(groupby(d, [:variable, :Species]), :value => mean => :vsum)
330330
15×3 DataFrame
331331
Row │ variable Species vsum
332-
│ String String Float64
332+
│ String String15 Float64
333333
─────┼───────────────────────────────────────
334334
1 │ SepalLength Iris-setosa 5.006
335335
2 │ SepalLength Iris-versicolor 5.936

docs/src/man/sorting.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ julia> iris = CSV.read((joinpath(dirname(pathof(DataFrames)),
1010
DataFrame)
1111
150×5 DataFrame
1212
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
13-
│ Float64 Float64 Float64 Float64 String
13+
│ Float64 Float64 Float64 Float64 String15
1414
─────┼──────────────────────────────────────────────────────────────────
1515
1 │ 5.1 3.5 1.4 0.2 Iris-setosa
1616
2 │ 4.9 3.0 1.4 0.2 Iris-setosa
@@ -33,7 +33,7 @@ julia> iris = CSV.read((joinpath(dirname(pathof(DataFrames)),
3333
julia> sort!(iris)
3434
150×5 DataFrame
3535
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
36-
│ Float64 Float64 Float64 Float64 String
36+
│ Float64 Float64 Float64 Float64 String15
3737
─────┼──────────────────────────────────────────────────────────────────
3838
1 │ 4.3 3.0 1.1 0.1 Iris-setosa
3939
2 │ 4.4 2.9 1.4 0.2 Iris-setosa
@@ -65,7 +65,7 @@ Here are some examples showing most of the possible options:
6565
julia> sort!(iris, rev = true)
6666
150×5 DataFrame
6767
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
68-
│ Float64 Float64 Float64 Float64 String
68+
│ Float64 Float64 Float64 Float64 String15
6969
─────┼──────────────────────────────────────────────────────────────────
7070
1 │ 7.9 3.8 6.4 2.0 Iris-virginica
7171
2 │ 7.7 3.8 6.7 2.2 Iris-virginica
@@ -88,7 +88,7 @@ julia> sort!(iris, rev = true)
8888
julia> sort!(iris, [:Species, :SepalWidth])
8989
150×5 DataFrame
9090
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
91-
│ Float64 Float64 Float64 Float64 String
91+
│ Float64 Float64 Float64 Float64 String15
9292
─────┼──────────────────────────────────────────────────────────────────
9393
1 │ 4.5 2.3 1.3 0.3 Iris-setosa
9494
2 │ 4.4 2.9 1.4 0.2 Iris-setosa
@@ -111,7 +111,7 @@ julia> sort!(iris, [:Species, :SepalWidth])
111111
julia> sort!(iris, [order(:Species, by=length), order(:SepalLength, rev=true)])
112112
150×5 DataFrame
113113
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
114-
│ Float64 Float64 Float64 Float64 String
114+
│ Float64 Float64 Float64 Float64 String15
115115
─────┼───────────────────────────────────────────────────────────────────
116116
1 │ 5.8 4.0 1.2 0.2 Iris-setosa
117117
2 │ 5.7 3.8 1.7 0.3 Iris-setosa
@@ -148,7 +148,7 @@ rows will be sorted by increasing `:PetalLength`:
148148
julia> sort!(iris, [:Species, :PetalLength], rev=(true, false))
149149
150×5 DataFrame
150150
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
151-
│ Float64 Float64 Float64 Float64 String
151+
│ Float64 Float64 Float64 Float64 String15
152152
─────┼──────────────────────────────────────────────────────────────────
153153
1 │ 4.9 2.5 4.5 1.7 Iris-virginica
154154
2 │ 6.2 2.8 4.8 1.8 Iris-virginica
@@ -171,7 +171,7 @@ julia> sort!(iris, [:Species, :PetalLength], rev=(true, false))
171171
julia> sort!(iris, [order(:Species, rev=true), :PetalLength])
172172
150×5 DataFrame
173173
Row │ SepalLength SepalWidth PetalLength PetalWidth Species
174-
│ Float64 Float64 Float64 Float64 String
174+
│ Float64 Float64 Float64 Float64 String15
175175
─────┼──────────────────────────────────────────────────────────────────
176176
1 │ 4.9 2.5 4.5 1.7 Iris-virginica
177177
2 │ 6.2 2.8 4.8 1.8 Iris-virginica

0 commit comments

Comments
 (0)