From fc7bd78a5d8ae3cd0afdce2e6afe46023e8c7b7a Mon Sep 17 00:00:00 2001 From: parchd-1 Date: Mon, 17 Jul 2017 23:33:24 +0200 Subject: [PATCH 1/3] Make highlight functions match documentation --- pandas/io/formats/style.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index b08d3877f3b03..adf134752dd82 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -1043,7 +1043,7 @@ def bar(self, subset=None, axis=0, color='#d65f5f', width=100, return self - def highlight_max(self, subset=None, color='yellow', axis=0): + def highlight_max(self, subset=None, color='yellow', axis=None): """ Highlight the maximum by shading the background @@ -1065,7 +1065,7 @@ def highlight_max(self, subset=None, color='yellow', axis=0): return self._highlight_handler(subset=subset, color=color, axis=axis, max_=True) - def highlight_min(self, subset=None, color='yellow', axis=0): + def highlight_min(self, subset=None, color='yellow', axis=None): """ Highlight the minimum by shading the background From 56f4630305cd938075d1be0773cdb7b54d9ee94a Mon Sep 17 00:00:00 2001 From: parchd-1 Date: Tue, 18 Jul 2017 07:46:49 +0200 Subject: [PATCH 2/3] Change doc to match code instead --- pandas/io/formats/style.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index adf134752dd82..9d03d2a90467f 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -1043,7 +1043,7 @@ def bar(self, subset=None, axis=0, color='#d65f5f', width=100, return self - def highlight_max(self, subset=None, color='yellow', axis=None): + def highlight_max(self, subset=None, color='yellow', axis=0): """ Highlight the maximum by shading the background @@ -1054,9 +1054,9 @@ def highlight_max(self, subset=None, color='yellow', axis=None): subset: IndexSlice, default None a valid slice for ``data`` to limit the style application to color: str, default 'yellow' - axis: int, str, or None; default None - 0 or 'index' for columnwise, 1 or 'columns' for rowwise - or ``None`` for tablewise (the default) + axis: int, str, or None; default 0 + 0 or 'index' for columnwise (default), 1 or 'columns' for rowwise + or ``None`` for tablewise Returns ------- @@ -1065,7 +1065,7 @@ def highlight_max(self, subset=None, color='yellow', axis=None): return self._highlight_handler(subset=subset, color=color, axis=axis, max_=True) - def highlight_min(self, subset=None, color='yellow', axis=None): + def highlight_min(self, subset=None, color='yellow', axis=0): """ Highlight the minimum by shading the background @@ -1076,9 +1076,9 @@ def highlight_min(self, subset=None, color='yellow', axis=None): subset: IndexSlice, default None a valid slice for ``data`` to limit the style application to color: str, default 'yellow' - axis: int, str, or None; default None - 0 or 'index' for columnwise, 1 or 'columns' for rowwise - or ``None`` for tablewise (the default) + axis: int, str, or None; default 0 + 0 or 'index' for columnwise (default), 1 or 'columns' for rowwise + or ``None`` for tablewise Returns ------- From 53275fd19a6043bf7a9551945e5a2b6b197483c0 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Tue, 18 Jul 2017 09:07:06 -0700 Subject: [PATCH 3/3] MAINT: Add missing commas after "or" --- pandas/io/formats/style.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 9d03d2a90467f..d88a230b42403 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -1055,7 +1055,7 @@ def highlight_max(self, subset=None, color='yellow', axis=0): a valid slice for ``data`` to limit the style application to color: str, default 'yellow' axis: int, str, or None; default 0 - 0 or 'index' for columnwise (default), 1 or 'columns' for rowwise + 0 or 'index' for columnwise (default), 1 or 'columns' for rowwise, or ``None`` for tablewise Returns @@ -1077,7 +1077,7 @@ def highlight_min(self, subset=None, color='yellow', axis=0): a valid slice for ``data`` to limit the style application to color: str, default 'yellow' axis: int, str, or None; default 0 - 0 or 'index' for columnwise (default), 1 or 'columns' for rowwise + 0 or 'index' for columnwise (default), 1 or 'columns' for rowwise, or ``None`` for tablewise Returns