def pprint_value(self, value):
        """
        Generate the pretty printed representation of a value for
        inclusion in a table cell.
        """
        if isinstance(value, float):
            formatter = '{:.%df}' % self.float_precision
            formatted = formatter.format(value)
        elif isinstance(value, str):
            formatted = safe_unicode(value)
        else:
            formatted = str(value)

        if len(formatted) > self.max_value_len:
            return formatted[:(self.max_value_len-3)]+'...'
        else:
            return formatted
dataset/ETHPy150Open ioam/holoviews/holoviews/plotting/mpl/tabular.py/TablePlot.pprint_value/original