Skip to content

Commit fef074d

Browse files
committed
Minor cleanup
1 parent b9bbdc1 commit fef074d

File tree

3 files changed

+8
-32
lines changed

3 files changed

+8
-32
lines changed

src/abstractdataframe/abstractdataframe.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ completecases!(df)
502502
```
503503
504504
"""
505-
completecases!(df::AbstractDataFrame) = deleterows!(df, find(!completecases(df)))
505+
completecases!(df::AbstractDataFrame) = deleterows!(df, find(!, completecases(df)))
506506

507507
function Base.convert(::Type{Array}, df::AbstractDataFrame)
508508
convert(Matrix, df)

src/abstractdataframe/show.jl

+6-31
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ end
194194
#' chunkbounds = getchunkbounds(maxwidths, true)
195195
function getchunkbounds(maxwidths::Vector{Int},
196196
splitchunks::Bool,
197-
availablewidth::Int=Base.displaysize()[2]) # -> Vector{Int}
197+
availablewidth::Int=displaysize()[2]) # -> Vector{Int}
198198
ncols = length(maxwidths) - 1
199199
rowmaxwidth = maxwidths[ncols + 1]
200200
if splitchunks
@@ -335,7 +335,7 @@ function showrows(io::IO,
335335
end
336336

337337
rowmaxwidth = maxwidths[ncols + 1]
338-
chunkbounds = getchunkbounds(maxwidths, splitchunks, Base.displaysize(io)[2])
338+
chunkbounds = getchunkbounds(maxwidths, splitchunks, displaysize(io)[2])
339339
nchunks = length(chunkbounds) - 1
340340

341341
for chunkindex in 1:nchunks
@@ -438,10 +438,10 @@ end
438438
function Base.show(io::IO,
439439
df::AbstractDataFrame,
440440
splitchunks::Bool = true,
441-
rowlabel::Symbol = @compat(Symbol("Row")),
441+
rowlabel::Symbol = Symbol("Row"),
442442
displaysummary::Bool = true) # -> Void
443443
nrows = size(df, 1)
444-
dsize = Base.displaysize(io)
444+
dsize = displaysize(io)
445445
availableheight = dsize[1] - 5
446446
nrowssubset = fld(availableheight, 2)
447447
bound = min(nrowssubset - 1, nrows)
@@ -516,7 +516,7 @@ end
516516
function Base.showall(io::IO,
517517
df::AbstractDataFrame,
518518
splitchunks::Bool = false,
519-
rowlabel::Symbol = @compat(Symbol("Row")),
519+
rowlabel::Symbol = Symbol("Row"),
520520
displaysummary::Bool = true) # -> Void
521521
rowindices1 = 1:size(df, 1)
522522
rowindices2 = 1:0
@@ -574,33 +574,8 @@ function showcols(io::IO, df::AbstractDataFrame) # -> Void
574574
metadata = DataFrame(Name = _names(df),
575575
Eltype = eltypes(df),
576576
Missing = colmissing(df))
577-
showall(io, metadata, true, @compat(Symbol("Col #")), false)
577+
showall(io, metadata, true, Symbol("Col #"), false)
578578
return
579579
end
580580

581581
showcols(df::AbstractDataFrame) = showcols(STDOUT, df) # -> Void
582-
583-
# using Juno
584-
# using Juno: Inline, LazyTree, Table, Row, strong
585-
586-
# const SIZE = 25
587-
588-
# function to_matrix(df::AbstractDataFrame)
589-
# res = Array{Any}(size(df))
590-
# for (j, col) in enumerate(columns(df)), i = 1:length(col)
591-
# isassigned(col, i) && (res[i, j] = col[i])
592-
# end
593-
# return res
594-
# end
595-
596-
# function _render(df::AbstractDataFrame)
597-
# width = min(size(df, 2), SIZE)
598-
# height = min(size(df, 1), SIZE)
599-
# header = map(x->strong(string(x)), names(df)[1:width]')
600-
# body = Juno.undefs(to_matrix(df))[1:height, 1:width]
601-
# view = Table(vcat(header, body))
602-
# LazyTree(Row(typeof(df), text" ", Juno.dims(size(df)...)),
603-
# () -> [view])
604-
# end
605-
606-
# @render Inline df::AbstractDataFrame _render(df)

src/statsmodels/contrasts.jl

+1
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ function contrasts_matrix(C::HelmertCoding, baseind, n)
292292
mat = mat[[baseind; 1:(baseind-1); (baseind+1):end], :]
293293
return mat
294294
end
295+
295296
"""
296297
ContrastsCoding(mat::Matrix[, base[, levels]])
297298

0 commit comments

Comments
 (0)