# How to change default precision for all float dtypes in pn.widgets.Tabulator

**URL:** <https://discourse.holoviz.org/t/how-to-change-default-precision-for-all-float-dtypes-in-pn-widgets-tabulator/2973>\
**Category:** Panel\
**Tags:** tabulator\
**Created:** [October 21, 2021, 1:21pm UTC](https://discourse.holoviz.org/t/how-to-change-default-precision-for-all-float-dtypes-in-pn-widgets-tabulator/2973 "2021-10-21T13:21:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Grusinator](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/grusinator/32/2311_2.png) [@Grusinator](https://discourse.holoviz.org/u/Grusinator)\
**Post date:** [October 21, 2021, 1:21pm UTC](https://discourse.holoviz.org/t/how-to-change-default-precision-for-all-float-dtypes-in-pn-widgets-tabulator/2973/1 "2021-10-21T13:21:29Z")

</div>

So in the tabulator widget, if you pass a float it will format it will the CellFormatter which will give you all decimals. As written in the documentation I can specify the formatter for each column like this:

```auto
formatters = {
    'col1': NumberFormatter(format='0.00'),
    'col2': NumberFormatter(format='0.00'),
}

```

But i would like to set the default precision to 2 decimals on all columns, how do i do that?

I have tried to play a bit around with the formatterParams and configuration parameter, but i did not seem to understand how to use it. it is not exactly clear to me how you can update the underlying tabulator params. my best attempt:  
`pn.widgets.Tabulator(df, configuration={"formatterParams":{"precision": 1}})`

I had a look here, but i cant figure out where to find the any settings that would help me. [http://tabulator.info/](http://tabulator.info/)

---

<div class="post-metadata">

**Author:** ![maximlt](https://discourse.holoviz.org/user_avatar/discourse.holoviz.org/maximlt/32/2487_2.png) [@maximlt](https://discourse.holoviz.org/u/maximlt)\
**Post date:** [October 21, 2021, 10:16pm UTC](https://discourse.holoviz.org/t/how-to-change-default-precision-for-all-float-dtypes-in-pn-widgets-tabulator/2973/2 "2021-10-21T22:16:55Z")

</div>

I don’t think there’s a way to do that for all the columns at once (please someone correct me if I’m wrong!). I’d just do something like:

```python
import numpy as np, pandas as df
df = pd.DataFrame(...)
formatters = {c: NumberFormatter(format='0.00') for c in df.columns if df[c].dtype == np.float64}
...

```
