# Approaching PrettyTables v2.0

**URL:** https://discourse.julialang.org/t/approaching-prettytables-v2-0/86739
**Category:** Community
**Created:** [September 3, 2022, 6:59pm UTC](https://discourse.julialang.org/t/approaching-prettytables-v2-0/86739 "2022-09-03T18:59:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)
#### Post date: [September 3, 2022, 6:59pm UTC](https://discourse.julialang.org/t/approaching-prettytables-v2-0/86739/1 "2022-09-03T18:59:50Z")

</div>

Hi!

We are approaching PrettyTables.jl v2.0! This version will be tagged when we have everything we need to make PrettyTables.jl the HTML backend in DataFrames ([Use PrettyTables.jl as HTML backend by ronisbr · Pull Request #3096 · JuliaData/DataFrames.jl · GitHub](https://github.com/JuliaData/DataFrames.jl/pull/3096)). This moment opens a window of opportunity for some breaking changes 😃 Hence, if anyone has any proposal that can be “easily” implemented, please, let me know (we do not have time for significant changes now).

The current code has a lot of internal modifications. We do not have many new features, but the performance is much better. The time to print the first table was reduced from almost 1s to 0.5s (part of the gain is due to Julia 1.8).

We also now support OffsetArrays:

```julia
julia> using PrettyTables

julia> using OffsetArrays

julia> A = OffsetArray(rand(3,3), -2:0, -3:-1);

julia> pretty_table(A, show_row_number = true)
┌─────┬──────────┬──────────┬──────────┐
│ Row │ Col. -3 │ Col. -2 │ Col. -1 │
├─────┼──────────┼──────────┼──────────┤
│ -2 │ 0.332428 │ 0.698186 │ 0.251798 │
│ -1 │ 0.285071 │ 0.434293 │ 0.987304 │
│ 0 │ 0.515081 │ 0.756921 │ 0.397783 │
└─────┴──────────┴──────────┴──────────┘

```

I would appreciate if someone could test `master` to check if I miss something!

---

<div class="post-metadata">

### Author: ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)
#### Post date: [September 3, 2022, 7:46pm UTC](https://discourse.julialang.org/t/approaching-prettytables-v2-0/86739/2 "2022-09-03T19:46:11Z")

</div>

@fonsp - this is related also to [DataFrames.jl+Pluto.jl integration · Issue #2206 · fonsp/Pluto.jl · GitHub](https://github.com/fonsp/Pluto.jl/issues/2206) as it would be great if we have a solid design for integration of PrettyTables.jl + Pluto.jl (in particular considering DataFrames.jl). Thank you!

---

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [September 3, 2022, 9:24pm UTC](https://discourse.julialang.org/t/approaching-prettytables-v2-0/86739/3 "2022-09-03T21:24:05Z")

</div>

my 2 cents : the LateX backend may be improved to sanitize names containing LateX special character like “\_”.

---

<div class="post-metadata">

### Author: ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)
#### Post date: [September 3, 2022, 9:55pm UTC](https://discourse.julialang.org/t/approaching-prettytables-v2-0/86739/4 "2022-09-03T21:55:36Z")

</div>

Hi @LaurentPlagne !

The escaping was already fix in `master`.

---

<div class="post-metadata">

### Author: ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)
#### Post date: [September 3, 2022, 10:09pm UTC](https://discourse.julialang.org/t/approaching-prettytables-v2-0/86739/5 "2022-09-03T22:09:42Z")

</div>

This one would be useful to me

> <https://github.com/ronisbr/PrettyTables.jl/issues/12>
>
> I wonder if there is any support or plan to support multicolumn headers. The ide…a would be to produce something in the vein of
> \`\`\`
> ┌───────────────────┬───────────────────┐
> │ Header 1 │ Header 2 │ 
> ├──────────┬────────┼────────┬──────────┤
> │ Col. 1 │ Col. 2 │ Col. 3 │ Col. 4 │
> ├──────────┼────────┼────────┼──────────┤
> │ 1.000 │ false │ 1.0 │ 1.000 │
> │ 2.000 │ true │ 2.0 │ 2.000 │
> │ 3.000 │ false │ 3.0 │ 3.000 │
> │ 4.000 │ true │ 4.0 │ 4.000 │
> │ 5.000 │ false │ 5.0 │ 5.000 │
> │ 6.000 │ true │ 6.0 │ 6.000 │
> └──────────┴────────┴────────┴──────────┘
> \`\`\`
> Thanks!

---

<div class="post-metadata">

### Author: ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)
#### Post date: [September 3, 2022, 10:26pm UTC](https://discourse.julialang.org/t/approaching-prettytables-v2-0/86739/6 "2022-09-03T22:26:30Z")

</div>

Hi @jar1 !

Yeah… I know this would be an awesome feature. However, implement it consistently among all backends will be extremely difficult. I think I will not have the time to finish it for this new version , sorry ☹
