def _value_formatter(self, float_format=None, threshold=None):
<EOL>if float_format is None:<EOL><INDENT>float_format = self.float_format<EOL><DEDENT>if float_format:<EOL><INDENT>def base_formatter(v):<EOL><INDENT>return float_format(value=v) if notna(v) else self.na_rep<EOL><DEDENT><DEDENT>else:<EOL><INDENT>def base_formatter(v):<EOL><INDENT>return str(v) if notna(v) else self.na_rep<EOL><DEDENT><DEDENT>if self.decimal != '<STR_LIT:.>':<EOL><INDENT>def decimal_formatter(v):<EOL><INDENT>return base_formatter(v).replace('<STR_LIT:.>', self.decimal, <NUM_LIT:1>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>decimal_formatter = base_formatter<EOL><DEDENT>if threshold is None:<EOL><INDENT>return decimal_formatter<EOL><DEDENT>def formatter(value):<EOL><INDENT>if notna(value):<EOL><INDENT>if abs(value) > threshold:<EOL><INDENT>return decimal_formatter(value)<EOL><DEDENT>else:<EOL><INDENT>return decimal_formatter(<NUM_LIT:0.0>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return self.na_rep<EOL><DEDENT><DEDENT>return formatter<EOL>
Returns a function to be applied on each value to format it