8000 ENH: `Styler.apply_index` and `Styler.applymap_index` for conditional formatting of column/index headers by attack68 · Pull Request #41893 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

ENH: Styler.apply_index and Styler.applymap_index for conditional formatting of column/index headers #41893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
Aug 11, 2021
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ece8855
add apply across index
attack68 Jun 9, 2021
a3a88e5
add applymap across index
attack68 Jun 9, 2021
066e4f3
improve docs
attack68 Jun 9, 2021
50dbcc7
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Jun 11, 2021
ef5839f
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Jun 12, 2021
5e4c1c0
add column header styling and amend tests
attack68 Jun 12, 2021
20ac7e0
doc sharing
attack68 Jun 13, 2021
26c5340
doc fix
attack68 Jun 13, 2021
2437b72
doc fix
attack68 Jun 13, 2021
312a6e6
collapse the cellstyle maps
attack68 Jun 13, 2021
553426f
add basic test
attack68 Jun 13, 2021
f01dfee
add basic test
attack68 Jun 13, 2021
f940165
parametrise tests
attack68 Jun 13, 2021
6f5b46c
test for raises ValueError
attack68 Jun 13, 2021
75cf6ca
test html working
attack68 Jun 13, 2021
d654139
test html working
attack68 Jun 13, 2021
728091a
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Jun 14, 2021
17787ef
whats new 1.4.0
attack68 Jun 14, 2021
248de0d
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Jun 20, 2021
321458e
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Jun 29, 2021
ed58798
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Jul 13, 2021
8d8e88f
update tests
attack68 Jul 14, 2021
e17d766
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Jul 30, 2021
f70bf65
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Aug 6, 2021
3dfe6d5
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Aug 9, 2021
81f3a3c
rename: applymap_header -->> applymap_index
attack68 Aug 9, 2021
e709777
skip doctests
attack68 Aug 9, 2021
1e6efea
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Aug 9, 2021
ab237b0
rename levels -->> level
attack68 Aug 9, 2021
9b7ec06
update user guide
attack68 Aug 9, 2021
1c7ef8b
Merge remote-tracking branch 'upstream/master' into styler_apply_inde…
attack68 Aug 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test for raises ValueError
  • Loading branch information
attack68 committed Jun 13, 2021
commit 6f5b46c8071f76c8d4153e64e066b55f15449bb8
5 changes: 5 additions & 0 deletions pandas/tests/io/formats/style/test_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ def test_apply_map_header_mi(mi_styler, method, axis):
assert getattr(result, f"ctx_{axis}") == expected


def test_apply_map_header_raises(mi_styler):
with pytest.raises(ValueError, match="`axis` must be one of 0, 1, 'index', 'col"):
mi_styler.applymap_header(lambda v: "attr: val;", axis="bad-axis")._compute()


class TestStyler:
def setup_method(self, method):
np.random.seed(24)
Expand Down
0