Thank you @Ronis_BR ! No rush. Hope you can solve these problemsππΌ
Thanks!!
Hope you can solve your problems soon! If it cheers you up, you should know that this package has massively helped a lot of people.
Thanks!!
Hi @Ronis_BR,
I hope your problems will be solved soon!
I am currently implementing PrettyTables into GenieFramework and I am about to define the following struct type that contains both the data and the configuration.
mutable struct PrettyTable{T}
data::T
conf::PrettyTablesConf
end
PrettyTable(data) = PrettyTable(data, PrettyTablesConf())
PrettyTables.pretty_table(@nospecialize(pt::PrettyTable); kwargs...) = pretty_table_with_conf(pt.conf, pt.data; kwargs...)
PrettyTables.pretty_table(@nospecialize(io_or_String), @nospecialize(pt::PrettyTable); kwargs...) = pretty_table_with_conf(pt.conf, pt.data; kwargs...)
Do you think it is reasonable to make that definition part of your package? Other frameworks might also benefit.
If so, Iβd be happy to provide a PR including docs and tests.
Hi @hhaensel !
I think it will be very nice. Indeed, there was a lot of request for this. However, maybe it is better to wait for the rewrite because I am changing a lot of things (check the v3
branch).
Will do
Had a look into v3 and started a PR add mutable struct `PrettyTable` to comprise data, backend and config by hhaensel Β· Pull Request #257 Β· ronisbr/PrettyTables.jl Β· GitHub
Thanks! I will take a look as soon as possible!
Hi everyone!
Just a small update, after a lot of life stuff, I will be able to resume the work in PrettyTables.jl I hope to have some news during this weekend!
Oh no! I use this all the time. Nothing easier to work with tables. Please keep it!
Hi @Jerry !
Can you please detail your use case? I am really trying to keep the features at a minimum to make easier to maintain PrettyTables.jl.
Hi Ronis_BR. Can I expect a little more compactness between columns? Currently, there is a minimum of 3 spaces between columns.
Hi @karei!
If you remove all vertical lines, you can have two spaces between the columns:
julia> A = rand(3, 3)
3Γ3 Matrix{Float64}:
0.488513 0.304572 0.29507
0.0225261 0.402398 0.941425
0.203874 0.570825 0.254407
julia> pretty_table(A; table_format = TextTableFormat(; @text__no_vertical_lines))
βββββββββββββββββββββββββββββββ
Col. 1 Col. 2 Col. 3
βββββββββββββββββββββββββββββββ
0.488513 0.304572 0.29507
0.0225261 0.402398 0.941425
0.203874 0.570825 0.254407
βββββββββββββββββββββββββββββββ
By the way, one very nice feature added to the v3 branch, which was created by @hhaensel, is the definition of the type PrettyTable
. This was something that many people had asked for, but I had been hesitant to add it because PrettyTables.jl should primarily be a backend for printing tables, not a tool for defining objects. However, it turns out that we can use this new object to construct the table in a more bottom-up manner and also provide an object that can be used to overload printing in many cases.
julia> using PrettyTables
julia> pt = PrettyTable(rand(3,3))
ββββββββββββ¬βββββββββββ¬βββββββββββ
β Col. 1 β Col. 2 β Col. 3 β
ββββββββββββΌβββββββββββΌβββββββββββ€
β 0.898637 β 0.611356 β 0.399206 β
β 0.990356 β 0.98928 β 0.959873 β
β 0.798757 β 0.991781 β 0.145727 β
ββββββββββββ΄βββββββββββ΄βββββββββββ
julia> pt.table_format = TextTableFormat(; @text__no_vertical_lines)
TextTableFormat(TextTableBorders('β', 'β', 'β', 'β', 'β¬', 'β', 'β€', 'βΌ', 'β΄', 'β', 'β'), true, :none, true, :none, true, true, true, true, false, false, false, :none, false, false, true, 0)
julia> pt
ββββββββββββββββββββββββββββββ
Col. 1 Col. 2 Col. 3
ββββββββββββββββββββββββββββββ
0.898637 0.611356 0.399206
0.990356 0.98928 0.959873
0.798757 0.991781 0.145727
ββββββββββββββββββββββββββββββ
julia> pt.column_labels = ["Column 1", MultiColumn(2, "Merged Columns")]
2-element Vector{Any}:
"Column 1"
MultiColumn(2, "Merged Columns", :c)
julia> pt
ββββββββββββββββββββββββββββββ
Column 1 Merged Columns
ββββββββββββββββββββββββββββββ
0.898637 0.611356 0.399206
0.990356 0.98928 0.959873
0.798757 0.991781 0.145727
ββββββββββββββββββββββββββββββ
Hi everyone!
Iβve finally pushed the version 3 of PrettyTables.jl to the master
branch! While thereβs still some documentation that I need to write, I believe weβre in a good position for everyone using the package to begin testing.
I anticipate breaking many things when I tag version 3. This is particularly concerning because DataFrames.jl will still be using version 2, and we cannot have two versions of the same package in use simultaneously. Therefore, I strongly believe that we should ensure a stable version 3 API before proceeding further.
Please, provide feedback here or in an issue in the repository!
@Jerry by the way, I decided to keep the stand_alone
option in HTML, but with a simplified CSS style that is easier to maintain.
Great. Sorry for the late reply. I dump the table to a HTML file and have the same Julia program command Firefox to open the new file in a new tab. Maybe Iβm not using PrettyTables right.
Hi!
The migration of DataFrames.jl to the new API is happening very smoothly
I decided to migrate the code in a local repository to check if features are missing.