Skip to content
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

Document the behavior of `axis=None` with `style.background_gradient` #25551

Merged
merged 7 commits into from Mar 7, 2019

Add default values to axis docstrings

  • Loading branch information...
joelostblom committed Mar 5, 2019
commit 8693a01774859d343f9222aa8034c4a457726875
@@ -576,7 +576,7 @@ def apply(self, func, axis=0, subset=None, **kwargs):
on ``axis``), and return an object with the same shape.
Must return a DataFrame with identical index and
column labels when ``axis=None``
axis : int, str or None
axis : int, str or None, default 0
This conversation was marked as resolved by WillAyd

This comment has been minimized.

Copy link
@WillAyd

WillAyd Mar 5, 2019

Member
Suggested change
axis : int, str or None, default 0
axis : {0 or ‘index’, 1 or ‘columns’, None}, default 0

I suppose the default here is different than using None in other places but orthogonal to this, so let's just use same documentation changing None to 0

This comment has been minimized.

Copy link
@joelostblom

joelostblom Mar 5, 2019

Author Contributor

Sorry I don't completely follow this. Your suggestion does not change None to 0. Do you want me to update all the axis docstrings to have this syntax? Or just commit your suggestion for this one.

This comment has been minimized.

Copy link
@WillAyd

WillAyd Mar 5, 2019

Member

All axis docstrings

This comment has been minimized.

Copy link
@joelostblom

joelostblom Mar 5, 2019

Author Contributor

Done

apply to each column (``axis=0`` or ``'index'``)
or to each row (``axis=1`` or ``'columns'``) or
to the entire DataFrame at once with ``axis=None``
@@ -894,7 +894,7 @@ def background_gradient(self, cmap='PuBu', low=0, high=0, axis=0,
matplotlib colormap
low, high : float
compress the range by these values.
axis : int, str or None
axis : int, str or None, default 0
apply to each column (``axis=0`` or ``'index'``) or to each row
(``axis=1`` or ``'columns'``) or to the entire DataFrame at once
with ``axis=None``.
@@ -1153,7 +1153,7 @@ def highlight_max(self, subset=None, color='yellow', axis=0):
subset : IndexSlice, default None
a valid slice for ``data`` to limit the style application to
color : str, default 'yellow'
axis : int, str or None
axis : int, str or None, default 0
apply to each column (``axis=0`` or ``'index'``) or to each row
(``axis=1`` or ``'columns'``) or to the entire DataFrame at once
with ``axis=None``.
@@ -1174,7 +1174,7 @@ def highlight_min(self, subset=None, color='yellow', axis=0):
subset : IndexSlice, default None
a valid slice for ``data`` to limit the style application to
color : str, default 'yellow'
axis : int, str or None
axis : int, str or None, default 0
apply to each column (``axis=0`` or ``'index'``) or to each row
(``axis=1`` or ``'columns'``) or to the entire DataFrame at once
with ``axis=None``.
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.