From 13d5ca6ef0deeb9ffc80416de8ae9f5ffa626fee Mon Sep 17 00:00:00 2001 From: attack68 <24256554+attack68@users.noreply.github.com> Date: Wed, 18 Aug 2021 22:18:13 +0200 Subject: [PATCH] Backport PR #43097: DOC: `styler.format` does not, in fact, raise a KeyError --- pandas/io/formats/style_render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/formats/style_render.py b/pandas/io/formats/style_render.py index 97a05329507c9..a2841ebcbab02 100644 --- a/pandas/io/formats/style_render.py +++ b/pandas/io/formats/style_render.py @@ -640,7 +640,7 @@ def format( to. If the ``formatter`` argument is given in dict form but does not include all columns within the subset then these columns will have the default formatter applied. Any columns in the formatter dict excluded from the subset will - raise a ``KeyError``. + be ignored. When using a ``formatter`` string the dtypes must be compatible, otherwise a `ValueError` will be raised.