|
194 | 194 | #' chunkbounds = getchunkbounds(maxwidths, true)
|
195 | 195 | function getchunkbounds(maxwidths::Vector{Int},
|
196 | 196 | splitchunks::Bool,
|
197 |
| - availablewidth::Int=Base.displaysize()[2]) # -> Vector{Int} |
| 197 | + availablewidth::Int=displaysize()[2]) # -> Vector{Int} |
198 | 198 | ncols = length(maxwidths) - 1
|
199 | 199 | rowmaxwidth = maxwidths[ncols + 1]
|
200 | 200 | if splitchunks
|
@@ -335,7 +335,7 @@ function showrows(io::IO,
|
335 | 335 | end
|
336 | 336 |
|
337 | 337 | rowmaxwidth = maxwidths[ncols + 1]
|
338 |
| - chunkbounds = getchunkbounds(maxwidths, splitchunks, Base.displaysize(io)[2]) |
| 338 | + chunkbounds = getchunkbounds(maxwidths, splitchunks, displaysize(io)[2]) |
339 | 339 | nchunks = length(chunkbounds) - 1
|
340 | 340 |
|
341 | 341 | for chunkindex in 1:nchunks
|
@@ -438,10 +438,10 @@ end
|
438 | 438 | function Base.show(io::IO,
|
439 | 439 | df::AbstractDataFrame,
|
440 | 440 | splitchunks::Bool = true,
|
441 |
| - rowlabel::Symbol = @compat(Symbol("Row")), |
| 441 | + rowlabel::Symbol = Symbol("Row"), |
442 | 442 | displaysummary::Bool = true) # -> Void
|
443 | 443 | nrows = size(df, 1)
|
444 |
| - dsize = Base.displaysize(io) |
| 444 | + dsize = displaysize(io) |
445 | 445 | availableheight = dsize[1] - 5
|
446 | 446 | nrowssubset = fld(availableheight, 2)
|
447 | 447 | bound = min(nrowssubset - 1, nrows)
|
|
516 | 516 | function Base.showall(io::IO,
|
517 | 517 | df::AbstractDataFrame,
|
518 | 518 | splitchunks::Bool = false,
|
519 |
| - rowlabel::Symbol = @compat(Symbol("Row")), |
| 519 | + rowlabel::Symbol = Symbol("Row"), |
520 | 520 | displaysummary::Bool = true) # -> Void
|
521 | 521 | rowindices1 = 1:size(df, 1)
|
522 | 522 | rowindices2 = 1:0
|
@@ -574,33 +574,8 @@ function showcols(io::IO, df::AbstractDataFrame) # -> Void
|
574 | 574 | metadata = DataFrame(Name = _names(df),
|
575 | 575 | Eltype = eltypes(df),
|
576 | 576 | Missing = colmissing(df))
|
577 |
| - showall(io, metadata, true, @compat(Symbol("Col #")), false) |
| 577 | + showall(io, metadata, true, Symbol("Col #"), false) |
578 | 578 | return
|
579 | 579 | end
|
580 | 580 |
|
581 | 581 | 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) |
0 commit comments