@staticmethod
def _highlight_extrema(data, color='yellow', max_=True):
    '\n        Highlight the min or max in a Series or DataFrame.\n        '
    attr = 'background-color: {0}'.format(color)
    if (data.ndim == 1):
        if max_:
            extrema = (data == data.max())
        else:
            extrema = (data == data.min())
        return [(attr if v else '') for v in extrema]
    else:
        if max_:
            extrema = (data == data.max().max())
        else:
            extrema = (data == data.min().min())
        return pd.DataFrame(np.where(extrema, attr, ''), index=data.index, columns=data.columns)
Highlight the min or max in a Series or DataFrame.
@staticmethod
def _highlight_extrema(data, color='yellow', max_=True):
    '\n        \n        '
    attr = 'background-color: {0}'.format(color)
    if (data.ndim == 1):
        if max_:
            extrema = (data == data.max())
        else:
            extrema = (data == data.min())
        return [(attr if v else ) for v in extrema]
    else:
        if max_:
            extrema = (data == data.max().max())
        else:
            extrema = (data == data.min().min())
        return pd.DataFrame(np.where(extrema, attr, ), index=data.index, columns=data.columns)