diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 2b882207d9115..735fb345363c7 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -2085,6 +2085,6 @@ def _maybe_convert_css_to_tuples(style: CSSProperties) -> CSSSequence: except IndexError: raise ValueError( "Styles supplied as string must follow CSS rule formats, " - f"for example 'attr: val;'. {style} was given." + f"for example 'attr: val;'. '{style}' was given." ) return style