From 'Column_x0020_Title' to  'Column Title
19571
def _convert_to_display(self, data):
        """'"""
        for _dict in data:
            keys = list(_dict.keys())[:]
            for key in keys:
                if key not in self._sp_cols:
                    raise Exception(key + ' not a column in current List.')
                _dict[self._sp_cols[key]['name']] = self._python_type(key, _dict.pop(key))
366519
def _sanitize_column_names(data):
    """"""
    new_names = {}
    for name in data.columns:
        new_names[name] = _ILLEGAL_CHARACTER_PAT.sub("_", name)
    return new_names
591227
def wr_title(self, worksheet, row_idx=0):
        """"""
        if self.vars.title is not None:
            # Title is one line
            if isinstance(self.vars.title, str):
                return self.wr_row_mergeall(worksheet, self.vars.title, self.fmt_hdr, row_idx)
            # Title is multi-line
            else:
                ridx = row_idx
                for title_line in self.vars.title:
                    ridx = self.wr_row_mergeall(worksheet, title_line, self.fmt_hdr, ridx)
                return ridx
        return row_idx
954293
def get_column_list_from_select(self, txt, col_delim=','):
        
        return [c.strip().strip(',') for c in txt.split(col_delim)]
499244
def normalize_col_name(self, col_name, used_column_names, is_relation):
        
        field_params = {}
        field_notes = []

        new_name = col_name.lower()
        if new_name != col_name:
            field_notes.append('Field name made lowercase.')

        if is_relation:
            if new_name.endswith('_id'):
                new_name = new_name[:-3]
            else:
                field_params['db_column'] = col_name

        new_name, num_repl = re.subn(r'\W', '_', new_name)
        if num_repl > 0:
            field_notes.append('Field renamed to remove unsuitable characters.')

        if new_name.find('__') >= 0:
            while new_name.find('__') >= 0:
                new_name = new_name.replace('__', '_')
            if col_name.lower().find('__') >= 0:
                # Only add the comment if the double underscore was in the original name
                field_notes.append("Field renamed because it contained more than one '_' in a row.")

        if new_name.startswith('_'):
            new_name = 'field%s' % new_name
            field_notes.append("Field renamed because it started with '_'.")

        if new_name.endswith('_'):
            new_name = '%sfield' % new_name
            field_notes.append("Field renamed because it ended with '_'.")

        if keyword.iskeyword(new_name):
            new_name += '_field'
            field_notes.append('Field renamed because it was a Python reserved word.')

        if new_name[0].isdigit():
            new_name = 'number_%s' % new_name
            field_notes.append("Field renamed because it wasn't a valid Python identifier.")

        if new_name in used_column_names:
            num = 0
            while '%s_%d' % (new_name, num) in used_column_names:
                num += 1
            new_name = '%s_%d' % (new_name, num)
            field_notes.append('Field renamed because of name conflict.')

        if col_name != new_name and field_notes:
            field_params['db_column'] = col_name

        return new_name, field_params, field_notes
593381
def map_column(self, value):
        
        if value in self.null_values:
            return r'\\N'
        else:
            return default_escape(six.text_type(value))
150848
def outitem(title, elems, indent=4):
    """"""
    out(title)
    max_key_len = max(len(key) for key, _ in elems) + 1
    for key, val in elems:
        key_spaced = ('%s:' % key).ljust(max_key_len)
        out('%s%s %s' % (indent * ' ', key_spaced, val))
    out()
937356
def rename_column(old, nu)
      col = @origin.columns[old.to_s]

      definition = col[:type]
      definition += ' NOT NULL' unless col[:is_nullable]
      definition += " DEFAULT #{@connection.quote(col[:column_default])}" if col[:column_default]

      ddl('alter table `%s` change column `%s` `%s` %s' % [@name, old, nu, definition])
      @renames[old.to_s] = nu.to_s
    end
917035
private void processAlterColumnRename(Table table, ColumnSchema column) {

        checkIsSimpleName();

        if (table.findColumn(token.tokenString) > -1) {
            throw Error.error(ErrorCode.X_42504, token.tokenString);
        }

        database.schemaManager.checkColumnIsReferenced(table.getName(),
                column.getName());
        session.commit(false);
        table.renameColumn(column, token.tokenString, isDelimitedIdentifier());
        read();
    }
188444
def do_title(s):
    
    return ''.join(
        [item[0].upper() + item[1:].lower()
         for item in _word_beginning_split_re.split(soft_unicode(s))
         if item])
135232
def as_text(self, max_rows=0, sep=" | "):
        """"""
        if not max_rows or max_rows > self.num_rows:
            max_rows = self.num_rows
        omitted = max(0, self.num_rows - max_rows)
        labels = self._columns.keys()
        fmts = self._get_column_formatters(max_rows, False)
        rows = [[fmt(label, label=True) for fmt, label in zip(fmts, labels)]]
        for row in itertools.islice(self.rows, max_rows):
            rows.append([f(v, label=False) for v, f in zip(row, fmts)])
        lines = [sep.join(row) for row in rows]
        if omitted:
            lines.append('... ({} rows omitted)'.format(omitted))
        return '\n'.join([line.rstrip() for line in lines])
124508
def transform(self, col):
        

        out = pd.DataFrame()

        # Make sure all nans are handled the same by replacing with None
        column = col[self.col_name].replace({np.nan: None})
        out[self.col_name] = column.apply(self.get_val)

        return out
259574
def make_column_label(command_name, description, default):
    ''''''
    for (pattern, label) in description_map:
        if fnmatch.fnmatch(description, pattern):
            return label
    return default
268170
def normalize_column_names(df):
    
    """
    columns = df.columns if hasattr(df, 'columns') else df
    columns = [c.lower().replace(' ', '_') for c in columns]
    return columns
785608
def move_to_start(self, column_label):
        """"""
        self._columns.move_to_end(column_label, last=False)
        return self
1208410
public void setColumnTitle(String colName, String title) {
        ColumnDefEx col = findColumn(colName);
        if (col == null) return;
        col.setTitle(title);
        JsDataTable.setColTitle(getElement(), colName, title);
    }
415922
def _set_renamed_columns(self, table_diff, command, column):
        
        new_column = Column(command.to, column.get_type(), column.to_dict())

        table_diff.renamed_columns = {command.from_: new_column}

        return table_diff