Skip to content

Commit 897a8cb

Browse files
authored
Add missing triple quotes around docstrings (#3194)
1 parent 7216ade commit 897a8cb

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/abstractdataframe/abstractdataframe.jl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ selector (this is useful in particular with regular expressions, `Cols`, `Not`,
5050
See also [`propertynames`](@ref) which returns a `Vector{Symbol}`.
5151
5252
# Examples
53+
5354
```jldoctest
5455
julia> df = DataFrame(x1=[1, missing, missing], x2=[3, 2, 4], x3=[3, missing, 2], x4=Union{Int, Missing}[2, 4, 4])
5556
3×4 DataFrame
@@ -154,6 +155,7 @@ when a column is renamed, its `:note`-style metadata becomes associated to its n
154155
See also: [`rename`](@ref)
155156
156157
# Examples
158+
157159
```jldoctest
158160
julia> df = DataFrame(i=1, x=2, y=3)
159161
1×3 DataFrame
@@ -298,6 +300,7 @@ new name.
298300
See also: [`rename!`](@ref)
299301
300302
# Examples
303+
301304
```jldoctest
302305
julia> df = DataFrame(i=1, x=2, y=3)
303306
1×3 DataFrame
@@ -359,6 +362,7 @@ and `2` corresponds to columns.
359362
See also: [`nrow`](@ref), [`ncol`](@ref)
360363
361364
# Examples
365+
362366
```jldoctest
363367
julia> df = DataFrame(a=1:3, b='a':'c');
364368
@@ -610,6 +614,7 @@ access missing values.
610614
Metadata: this function drops all metadata.
611615
612616
# Examples
617+
613618
```jldoctest
614619
julia> df = DataFrame(i=1:10, x=0.1:0.1:1.0, y='a':'j');
615620
@@ -1087,6 +1092,7 @@ $METADATA_FIXED
10871092
See also: [`filter!`](@ref)
10881093
10891094
# Examples
1095+
10901096
```jldoctest
10911097
julia> df = DataFrame(x=[3, 1, 2, 1], y=["b", "c", "a", "b"])
10921098
4×2 DataFrame
@@ -1216,6 +1222,7 @@ $METADATA_FIXED
12161222
See also: [`filter`](@ref)
12171223
12181224
# Examples
1225+
12191226
```jldoctest
12201227
julia> df = DataFrame(x=[3, 1, 2, 1], y=["b", "c", "a", "b"])
12211228
4×2 DataFrame
@@ -1353,6 +1360,7 @@ See also [`unique`](@ref) and [`unique!`](@ref).
13531360
returns at least one column if `df` has at least one column.
13541361
13551362
# Examples
1363+
13561364
```jldoctest
13571365
julia> df = DataFrame(i=1:4, x=[1, 2, 1, 2])
13581366
4×2 DataFrame
@@ -1446,6 +1454,7 @@ $METADATA_FIXED
14461454
See also: [`unique!`](@ref), [`nonunique`](@ref).
14471455
14481456
# Examples
1457+
14491458
```jldoctest
14501459
julia> df = DataFrame(i=1:4, x=[1, 2, 1, 2])
14511460
4×2 DataFrame
@@ -1520,6 +1529,7 @@ $METADATA_FIXED
15201529
See also: [`unique!`](@ref), [`nonunique`](@ref).
15211530
15221531
# Examples
1532+
15231533
```jldoctest
15241534
julia> df = DataFrame(i=1:4, x=[1, 2, 1, 2])
15251535
4×2 DataFrame
@@ -1582,6 +1592,7 @@ duplicates are allowed.
15821592
$METADATA_FIXED
15831593
15841594
# Examples
1595+
15851596
```jldoctest
15861597
julia> df = DataFrame(x=1:2, y='a':'b', z=["x", "y"])
15871598
2×3 DataFrame
@@ -2812,6 +2823,8 @@ $METADATA_FIXED
28122823
Metadata having other styles is dropped (from parent data frame when `df` is a `SubDataFrame`).
28132824
28142825
# Examples
2826+
2827+
```jldoctest
28152828
julia> df = DataFrame(a=1:5, b=6:10, c=11:15)
28162829
5×3 DataFrame
28172830
Row │ a b c
@@ -2833,6 +2846,7 @@ julia> permute!(df, [5, 3, 1, 2, 4])
28332846
3 │ 1 6 11
28342847
4 │ 2 7 12
28352848
5 │ 4 9 14
2849+
```
28362850
"""
28372851
Base.permute!(df::AbstractDataFrame, p::AbstractVector{<:Integer}) =
28382852
_permutation_helper!(Base.permute!!, df, p)
@@ -2852,6 +2866,7 @@ Metadata having other styles is dropped (from parent data frame when `df` is a `
28522866
28532867
# Examples
28542868
2869+
```jldoctest
28552870
julia> df = DataFrame(a=1:5, b=6:10, c=11:15)
28562871
5×3 DataFrame
28572872
Row │ a b c
@@ -2884,6 +2899,7 @@ julia> invpermute!(df, [5, 3, 1, 2, 4])
28842899
3 │ 3 8 13
28852900
4 │ 4 9 14
28862901
5 │ 5 10 15
2902+
```
28872903
"""
28882904
Base.invpermute!(df::AbstractDataFrame, p::AbstractVector{<:Integer}) =
28892905
_permutation_helper!(Base.invpermute!!, df, p)
@@ -2898,6 +2914,9 @@ $METADATA_FIXED
28982914
28992915
# Examples
29002916
2917+
```jldoctest
2918+
julia> using Random
2919+
29012920
julia> rng = MersenneTwister(1234);
29022921
29032922
julia> shuffle(rng, DataFrame(a=1:5, b=1:5))
@@ -2910,6 +2929,7 @@ julia> shuffle(rng, DataFrame(a=1:5, b=1:5))
29102929
3 │ 4 4
29112930
4 │ 3 3
29122931
5 │ 5 5
2932+
```
29132933
"""
29142934
Random.shuffle(df::AbstractDataFrame) =
29152935
df[randperm(nrow(df)), :]
@@ -2932,6 +2952,9 @@ Metadata having other styles is dropped (from parent data frame when `df` is a `
29322952
29332953
# Examples
29342954
2955+
```jldoctest
2956+
julia> using Random
2957+
29352958
julia> rng = MersenneTwister(1234);
29362959
29372960
julia> shuffle!(rng, DataFrame(a=1:5, b=1:5))
@@ -2944,6 +2967,7 @@ julia> shuffle!(rng, DataFrame(a=1:5, b=1:5))
29442967
3 │ 4 4
29452968
4 │ 3 3
29462969
5 │ 5 5
2970+
```
29472971
"""
29482972
Random.shuffle!(df::AbstractDataFrame) =
29492973
permute!(df, randperm(nrow(df)))

0 commit comments

Comments
 (0)