def _coerce_method(converter):
def wrapper(self):<EOL><INDENT>if len(self) == <NUM_LIT:1>:<EOL><INDENT>return converter(self.iloc[<NUM_LIT:0>])<EOL><DEDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>".format(str(converter)))<EOL><DEDENT>wrapper.__name__ = "<STR_LIT>".format(name=converter.__name__)<EOL>return wrapper<EOL>
Install the scalar coercion methods.