def where(self, cond, value, other=None, subset=None, **kwargs):
if other is None:<EOL><INDENT>other = '<STR_LIT>'<EOL><DEDENT>return self.applymap(lambda val: value if cond(val) else other,<EOL>subset=subset, **kwargs)<EOL>
Apply a function elementwise, updating the HTML
representation with a style which is selected in
accordance with the return value of a function.

.. versionadded:: 0.21.0

Parameters
----------
cond : callable
    ``cond`` should take a scalar and return a boolean
value : str
    applied when ``cond`` returns true
other : str
    applied when ``cond`` returns false
subset : IndexSlice
    a valid indexer to limit ``data`` to *before* applying the
    function. Consider using a pandas.IndexSlice
kwargs : dict
    pass along to ``cond``

Returns
-------
self : Styler

See Also
--------
Styler.applymap