# Print boolean with PrettyTables.jl

**URL:** https://discourse.julialang.org/t/print-boolean-with-prettytables-jl/65491
**Category:** General Usage
**Tags:** question, tables, io, prettytables
**Created:** [July 29, 2021, 11:51am UTC](https://discourse.julialang.org/t/print-boolean-with-prettytables-jl/65491 "2021-07-29T11:51:50Z")
**Posts on this page:** 1
**Showing post:** 3

<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: [July 29, 2021, 12:45pm UTC](https://discourse.julialang.org/t/print-boolean-with-prettytables-jl/65491/3 "2021-07-29T12:45:18Z")

</div>

It’s the `formatters` option. I think it applies to all `<: Number` types, and `Bool <: Number`.

You can define a small helper function which checks if something is a `Bool` and if so, returns that thing, and if not uses `@sprintf`, like in [this thread](https://discourse.julialang.org/t/converting-a-double-number-into-a-string-not-printing/65492).

---

_[View the full topic](https://discourse.julialang.org/t/print-boolean-with-prettytables-jl/65491)._
