Skip to content

Commit 6c73f62

Browse files
committed
merged
1 parent 22653c6 commit 6c73f62

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

pandas/io/formats/style.py

+23-22
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
FrameOrSeries,
3333
FrameOrSeriesUnion,
3434
IndexLabel,
35+
Scalar,
3536
)
3637
from pandas.compat._optional import import_optional_dependency
3738
from pandas.util._decorators import doc
@@ -1712,12 +1713,12 @@ def f(data: FrameOrSeries, props: str) -> np.ndarray:
17121713
)
17131714

17141715
def highlight_range(
1715-
self,
1716-
subset: Optional[IndexLabel] = None,
1717-
color: str = "yellow",
1718-
start: Optional[Any] = None,
1719-
stop: Optional[Any] = None,
1720-
props: Optional[str] = None,
1716+
self,
1717+
subset: Optional[IndexLabel] = None,
1718+
color: str = "yellow",
1719+
start: Optional[Any] = None,
1720+
stop: Optional[Any] = None,
1721+
props: Optional[str] = None,
17211722
) -> Styler:
17221723
"""
17231724
Highlight a defined range by shading the background, or otherwise.
@@ -1770,10 +1771,10 @@ def highlight_range(
17701771
"""
17711772

17721773
def f(
1773-
data: DataFrame,
1774-
props: str,
1775-
d: Optional[Scalar] = None,
1776-
u: Optional[Scalar] = None,
1774+
data: DataFrame,
1775+
props: str,
1776+
d: Optional[Scalar] = None,
1777+
u: Optional[Scalar] = None,
17771778
) -> np.ndarray:
17781779
ge_d = data >= d if d is not None else np.full_like(data, True, dtype=bool)
17791780
le_u = data <= u if u is not None else np.full_like(data, True, dtype=bool)
@@ -1784,13 +1785,13 @@ def f(
17841785
return self.apply(f, axis=None, subset=subset, props=props, d=start, u=stop)
17851786

17861787
def highlight_quantile(
1787-
self,
1788-
subset: Optional[IndexLabel] = None,
1789-
color: str = "yellow",
1790-
q_low: float = 0.0,
1791-
q_high: float = 1.0,
1792-
axis: Optional[Axis] = 0,
1793-
props: Optional[str] = None,
1788+
self,
1789+
subset: Optional[IndexLabel] = None,
1790+
color: str = "yellow",
1791+
q_low: float = 0.0,
1792+
q_high: float = 1.0,
1793+
axis: Optional[Axis] = 0,
1794+
props: Optional[str] = None,
17941795
) -> Styler:
17951796
"""
17961797
Highlight values defined by inclusion in given quantile by shading the
@@ -1834,11 +1835,11 @@ def highlight_quantile(
18341835
"""
18351836

18361837
def f(
1837-
data: FrameOrSeries,
1838-
props: str,
1839-
q_low: float = 0,
1840-
q_high: float = 1,
1841-
axis_: Optional[Axis] = 0,
1838+
data: FrameOrSeries,
1839+
props: str,
1840+
q_low: float = 0,
1841+
q_high: float = 1,
1842+
axis_: Optional[Axis] = 0,
18421843
):
18431844
if q_low > 0:
18441845
q, tgt_label = [0, q_low, q_high], 1

0 commit comments

Comments
 (0)