@@ -2952,17 +2952,17 @@ def background_gradient(
2952
2952
Setting a ``gmap`` and applying to all columns with another ``cmap``
2953
2953
2954
2954
>>> df.style.{name}_gradient(axis=0, gmap=df['Temp (c)'], cmap='YlOrRd')
2955
- ... # doctest: +SKIP
2955
+ ... # doctest: +SKIP
2956
2956
2957
2957
.. figure:: ../../_static/style/{image_prefix}_gmap.png
2958
2958
2959
2959
Setting the gradient map for a dataframe (i.e. ``axis=None``), we need to
2960
2960
explicitly state ``subset`` to match the ``gmap`` shape
2961
2961
2962
- >>> gmap = np.array([[1,2, 3], [2,3, 4], [3,4, 5]])
2963
- >>> df.style.{name}_gradient(axis=None, gmap=gmap,
2964
- ... cmap='YlOrRd', subset=['Temp (c)', 'Rain (mm)', 'Wind (m/s)']
2965
- ... ) # doctest: +SKIP
2962
+ >>> gmap = np.array([[1, 2, 3], [2, 3, 4], [3, 4, 5]])
2963
+ >>> df.style.{name}_gradient(
2964
+ ... axis=None, gmap=gmap, cmap='YlOrRd',
2965
+ ... subset=['Temp (c)', 'Rain (mm)', 'Wind (m/s)'] ) # doctest: +SKIP
2966
2966
2967
2967
.. figure:: ../../_static/style/{image_prefix}_axNone_gmap.png
2968
2968
"""
@@ -3510,22 +3510,23 @@ def highlight_quantile(
3510
3510
--------
3511
3511
Using ``axis=None`` and apply a quantile to all collective data
3512
3512
3513
- >>> df = pd.DataFrame(np.arange(10).reshape(2,5) + 1)
3513
+ >>> df = pd.DataFrame(np.arange(10).reshape(2, 5) + 1)
3514
3514
>>> df.style.highlight_quantile(axis=None, q_left=0.8, color="#fffd75")
3515
- ... # doctest: +SKIP
3515
+ ... # doctest: +SKIP
3516
3516
3517
3517
.. figure:: ../../_static/style/hq_axNone.png
3518
3518
3519
3519
Or highlight quantiles row-wise or column-wise, in this case by row-wise
3520
3520
3521
3521
>>> df.style.highlight_quantile(axis=1, q_left=0.8, color="#fffd75")
3522
- ... # doctest: +SKIP
3522
+ ... # doctest: +SKIP
3523
3523
3524
3524
.. figure:: ../../_static/style/hq_ax1.png
3525
3525
3526
3526
Use ``props`` instead of default background coloring
3527
3527
3528
- >>> df.style.highlight_quantile(axis=None, q_left=0.2, q_right=0.8,
3528
+ >>> df.style.highlight_quantile(
3529
+ ... axis=None, q_left=0.2, q_right=0.8,
3529
3530
... props='font-weight:bold;color:#e83e8c') # doctest: +SKIP
3530
3531
3531
3532
.. figure:: ../../_static/style/hq_props.png
0 commit comments