@@ -10,7 +10,7 @@ julia> iris = CSV.read((joinpath(dirname(pathof(DataFrames)),
1010 DataFrame)
1111150×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)),
3333julia> stack(iris, 1:4)
3434600×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:
6262julia> stack(iris, [:SepalLength, :SepalWidth, :PetalLength, :PetalWidth])
6363600×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:
100100julia> stack(iris, [:SepalLength, :SepalWidth], :Species)
101101300×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:
127127julia> stack(iris, Not(:Species))
128128600×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)
159159julia> longdf = stack(iris, Not([:Species, :id]))
160160600×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:
209209julia> unstack(longdf, :variable, :value)
210210150×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:
236236julia> unstack(longdf)
237237150×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:
264264julia> stack(iris, view=true)
265265600×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
306306julia> d = stack(iris, Not(:Species))
307307750×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))
329329julia> x = combine(groupby(d, [:variable, :Species]), :value => mean => :vsum)
33033015×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
0 commit comments