def _process_converter(self, f, filt=None):
if filt is None:<EOL><INDENT>filt = lambda col, c: True<EOL><DEDENT>needs_new_obj = False<EOL>new_obj = dict()<EOL>for i, (col, c) in enumerate(self.obj.iteritems()):<EOL><INDENT>if filt(col, c):<EOL><INDENT>new_data, result = f(col, c)<EOL>if result:<EOL><INDENT>c = new_data<EOL>needs_new_obj = True<EOL><DEDENT><DEDENT>new_obj[i] = c<EOL><DEDENT>if needs_new_obj:<EOL><INDENT>new_obj = DataFrame(new_obj, index=self.obj.index)<EOL>new_obj.columns = self.obj.columns<EOL>self.obj = new_obj<EOL><DEDENT>
Take a conversion function and possibly recreate the frame.