From 28b76eb0aa0ca056c53b988bf959205f53762b33 Mon Sep 17 00:00:00 2001 From: Dea Leon Date: Sat, 25 Feb 2023 17:20:31 +0100 Subject: [PATCH 1/2] DOC removed parentheses for readability --- pandas/errors/__init__.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pandas/errors/__init__.py b/pandas/errors/__init__.py index 3ecee50ffbaa7..9fbc7e258567e 100644 --- a/pandas/errors/__init__.py +++ b/pandas/errors/__init__.py @@ -455,12 +455,14 @@ class CSSWarning(UserWarning): Examples -------- >>> df = pd.DataFrame({'A': [1, 1, 1]}) - >>> (df.style.applymap(lambda x: 'background-color: blueGreenRed;') - ... .to_excel('styled.xlsx')) # doctest: +SKIP + >>> df.style.applymap( + ... lambda x: 'background-color: blueGreenRed;' + ... ).to_excel('styled.xlsx') # doctest: +SKIP ... # CSSWarning: Unhandled color format: 'blueGreenRed' - >>> (df.style.applymap(lambda x: 'border: 1px solid red red;') - ... .to_excel('styled.xlsx')) # doctest: +SKIP - ... # CSSWarning: Too many tokens provided to "border" (expected 1-3) + >>> df.style.applymap( + ... lambda x: 'border: 1px solid red red;' + ... ).to_excel('styled.xlsx') # doctest: +SKIP + CSSWarning: Unhandled color format: 'blueGreenRed' """ From eea152084ca040c02170f6afa6542c0f1d358bc5 Mon Sep 17 00:00:00 2001 From: Marco Edward Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Sat, 25 Feb 2023 17:38:54 +0000 Subject: [PATCH 2/2] minor nit --- pandas/errors/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/errors/__init__.py b/pandas/errors/__init__.py index 9fbc7e258567e..c4b804de6a110 100644 --- a/pandas/errors/__init__.py +++ b/pandas/errors/__init__.py @@ -458,11 +458,11 @@ class CSSWarning(UserWarning): >>> df.style.applymap( ... lambda x: 'background-color: blueGreenRed;' ... ).to_excel('styled.xlsx') # doctest: +SKIP - ... # CSSWarning: Unhandled color format: 'blueGreenRed' + CSSWarning: Unhandled color format: 'blueGreenRed' >>> df.style.applymap( ... lambda x: 'border: 1px solid red red;' ... ).to_excel('styled.xlsx') # doctest: +SKIP - CSSWarning: Unhandled color format: 'blueGreenRed' + CSSWarning: Unhandled color format: 'blueGreenRed' """