diff --git a/pandas/io/formats/style_render.py b/pandas/io/formats/style_render.py index 0253852fbb39a..4aaf1eecde5e8 100644 --- a/pandas/io/formats/style_render.py +++ b/pandas/io/formats/style_render.py @@ -486,13 +486,8 @@ def format( formatter = {col: formatter for col in columns} for col in columns: - try: - format_func = formatter[col] - except KeyError: - format_func = None - format_func = _maybe_wrap_formatter( - format_func, + formatter.get(col), na_rep=na_rep, precision=precision, decimal=decimal,