How to use Python Pandas Stylers for coloring an entire row based on a given column? : <p>I've been trying to print out a Pandas dataframe to html and have specific entire rows highlighted if the value of one specific column's value for that row is over a threshold. I've looked through the Pandas Styler Slicing and tried to vary the highlight_max function for such a use, but seem to be failing miserably; if I try, say, to replace the is_max with a check for whether a given row's value is above said threshold (e.g., something like </p>

<pre><code>is_x = df['column_name'] &gt;= threshold
</code></pre>

<p>), it isn't apparent how to properly pass such a thing or what to return.</p>

<p>I've also tried to simply define it elsewhere using df.loc, but that hasn't worked too well either.</p>

<p>Another concern also came up: If I drop that column (currently the criterion) afterwards, will the styling still hold? I am wondering if a df.loc would prevent such a thing from being a problem.</p>
