Skip to content

Commit

Permalink
Merge pull request #8865 from bashtage/styler-applymap
Browse files Browse the repository at this point in the history
MAINT: MOve from Styler.applymap to map
  • Loading branch information
bashtage committed May 5, 2023
2 parents b061678 + c83a4bf commit 51dc185
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions statsmodels/multivariate/factor.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,11 @@ def color_white_small(val):
"""
color = 'white' if np.abs(val) < threshold else 'black'
return 'color: %s' % color

sty = loadings_df.style.applymap(color_white_small)
try:
sty = loadings_df.style.map(color_white_small)
except AttributeError:
# Deprecated in pandas 2.1
sty = loadings_df.style.applymap(color_white_small)

if highlight_max is True:
def highlight_max(s):
Expand Down

0 comments on commit 51dc185

Please sign in to comment.