# PrettyTables number of decimals displayed

**URL:** https://discourse.julialang.org/t/prettytables-number-of-decimals-displayed/45802
**Category:** New to Julia
**Tags:** prettytables
**Created:** [August 30, 2020, 8:55pm UTC](https://discourse.julialang.org/t/prettytables-number-of-decimals-displayed/45802 "2020-08-30T20:55:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![nfatkhiyev](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@nfatkhiyev](https://discourse.julialang.org/u/nfatkhiyev)
#### Post date: [August 30, 2020, 8:55pm UTC](https://discourse.julialang.org/t/prettytables-number-of-decimals-displayed/45802/1 "2020-08-30T20:55:38Z")

</div>

I am using PrettyTables to create a table that is getting the values directly from a function. I would like each entry to have the same number of digits after the decimal. Can this even be done in PrettyTables?

```julia
q6_table_header = ["x" "original equation" "modified equaton"];
q6_table_data = ["10E-1" q6(10^(-1)) q6_modified(10^(-1));
                 "10E-2" q6(10^(-2)) q6_modified(10^(-2));
                 "10E-3" q6(10^(-3)) q6_modified(10^(-3));
                 "10E-4" q6(10^(-4)) q6_modified(10^(-4));
                 "10E-5" q6(10^(-5)) q6_modified(10^(-5));
                 "10E-6" q6(10^(-6)) q6_modified(10^(-6));
                 "10E-7" q6(10^(-7)) q6_modified(10^(-7));
                 "10E-8" q6(10^(-8)) q6_modified(10^(-8));
                 "10E-9" q6(10^(-9)) q6_modified(10^(-9));
                 "10E-10" q6(10^(-10)) q6_modified(10^(-10));
                 "10E-11" q6(10^(-11)) q6_modified(10^(-11));
                 "10E-12" q6(10^(-12)) q6_modified(10^(-12));]

pretty_table(q6_table_data, q6_table_header)

```

---

<div class="post-metadata">

### Author: ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)
#### Post date: [August 31, 2020, 1:04am UTC](https://discourse.julialang.org/t/prettytables-number-of-decimals-displayed/45802/2 "2020-08-31T01:04:26Z")

</div>

Yes see the section on formatters [here](https://ronisbr.github.io/PrettyTables.jl/stable/man/formatters/). You will have to learn the `printf` syntax though which is a bit of a pain.
