-
Notifications
You must be signed in to change notification settings - Fork 373
Open
Description
Currently compact printing only removes the last line break
julia> using DataFrames
julia> df = DataFrame(A = 1:4, B = ["M", "F", "F", "M"])
4×2 DataFrame
Row │ A B
│ Int64 String
─────┼───────────────
1 │ 1 M
2 │ 2 F
3 │ 3 F
4 │ 4 M
julia> show(IOContext(stdout, :compact=>true), df)
4×2 DataFrame
Row │ A B
│ Int64 String
─────┼───────────────
1 │ 1 M
2 │ 2 F
3 │ 3 F
4 │ 4 Mhowever, the convention should be
IOContext(io::IO, KV::Pair...)
Create an IOContext that wraps a given stream, adding the specified key=>value pairs to the
properties of that stream (note that io can itself be an IOContext).
• use (key => value) in io to see if this particular combination is in the properties set
• use get(io, key, default) to retrieve the most recent value for a particular key
The following properties are in common use:
• :compact: Boolean specifying that values should be printed more compactly, e.g. that
numbers should be printed with fewer digits. This is set when printing array elements.
:compact output should not contain line breaks.