Skip to content

Commit ccd74de

Browse files
authored
Fixed raise on empty string
1 parent 00d3458 commit ccd74de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/formats/style_render.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,7 +2069,7 @@ def maybe_convert_css_to_tuples(style: CSSProperties) -> CSSList:
20692069
('border','1px solid red')]
20702070
"""
20712071
if isinstance(style, str):
2072-
if ":" not in style:
2072+
if style and ":" not in style:
20732073
raise ValueError(
20742074
"Styles supplied as string must follow CSS rule formats, "
20752075
f"for example 'attr: val;'. '{style}' was given."
@@ -2080,7 +2080,7 @@ def maybe_convert_css_to_tuples(style: CSSProperties) -> CSSList:
20802080
for x in s
20812081
if ":".join(x.split(":")[1:]).strip() != ""
20822082
]
2083-
2083+
20842084
return style
20852085

20862086

0 commit comments

Comments
 (0)