Fill null cells in col with the previous non-null value
435557
def fillNullValues(col, rows):
    ''
    lastval = None
    nullfunc = isNullFunc()
    n = 0
    rowsToFill = list(rows)
    for r in Progress(col.sheet.rows, 'filling'):  # loop over all rows
        try:
            val = col.getValue(r)
        except Exception as e:
            val = e

        if nullfunc(val) and r in rowsToFill:
            if lastval:
                col.setValue(r, lastval)
                n += 1
        else:
            lastval = val

    col.recalc()
    status("filled %d values" % n)
1306159
def pop_empty_columns(self, empty=None):
        
        empty = ['', None] if empty is None else empty
        if len(self) == 0:
            return
        for col in list(self.columns):
            if self[0][col] in empty:
                if not [v for v in self.get_column(col) if v not in empty]:
                    self.pop_column(col)
849454
def SetColumnValues(self, col, value):
        
        try:
            self.dataframe.iloc[:, col] = value
        except ValueError:
            self.dataframe.loc[:, col] = value
510060
function findRowMergedLastIndex(tableData, rowIndex, colIndex) {
  const cellData = tableData[rowIndex][colIndex];
  let foundRowIndex = rowIndex;

  if (cellData.rowspan > 1) {
    foundRowIndex += cellData.rowspan - 1;
  }

  return foundRowIndex;
}
888439
function repeatColumns($first_col, $last_col = null)
    {
        $this->title_colmin  = $first_col;
        if (isset($last_col)) { // Second col is optional
            $this->title_colmax  = $last_col;
        } else {
            $this->title_colmax  = $first_col;
        }
    }
1359221
private void emptyCells(Row tmplRow, int rowOffset, Row row, int colStart, int colEnd) {
        for (int i = colStart; i <= colEnd; ++i) {
            newCell(tmplRow, i, rowOffset, row, "", 0);
        }
    }
1036183
def _get_cols(row_content):
    
    cols = []
    subcell_col = []
    prev_bar = None
    for _coord, item in row_content:
        if isinstance(item, LTTextLine):
            subcell_col.append(item)
        else:  # bar, add column content
            # When there is no content, we count a None column
            if prev_bar:
                bar_ranges = (prev_bar, item)
                col_items = subcell_col if subcell_col else [None]
                cols.extend([bar_ranges, col_items])
            prev_bar = item
            subcell_col = []
    # Remove extra column before first bar
    return cols
820454
private void addColumn(final List<String> columns, String line, int charIndex) {
		
		if(currentColumn.length() > 0){
			columns.add(currentColumn.toString());
		}
		else{
			int previousCharIndex = charIndex - 1;
			boolean availableCharacters = previousCharIndex >= 0 ;
			boolean previousCharIsQuote = availableCharacters && line.charAt(previousCharIndex) == quoteChar;
			String noValue = ( (previousCharIsQuote) && emptyColumnParsing.equals(EmptyColumnParsing.ParseEmptyColumnsAsEmptyString)) ? "" : null;
			columns.add(noValue);
		}
	}
1256914
def substitute_values(text, values):
    """"""
    shift, final_text, shifts = 0, text, defaultdict(int)
    for value in values:
        first = value['old_span'][0] + shift
        second = value['old_span'][1] + shift
        new_s = value['new_surface']
        final_text = final_text[0:first] + new_s + final_text[second:]
        shift += len(new_s) - len(value['old_surface'])
        for char in range(first + 1, len(final_text)):
            shifts[char] = shift

    logging.debug(u'Text after numeric conversion: "%s"', final_text)

    return final_text, shifts
413208
def combineColumns(cols):
    ''
    return Column("+".join(c.name for c in cols),
                  getter=lambda col,row,cols=cols,ch=' ': ch.join(c.getDisplayValue(row) for c in cols))
1260164
function fillArrayWithNull( arr, toIndex ) {
   for( let i = arr.length; i < toIndex; ++i ) {
      arr[ i ] = null;
   }
}
687453
def substitute_cellref(cell, *args)       #:nodoc:
    return [cell, *args] if cell.respond_to?(:coerce) # Numeric

    cell.upcase!

    # Convert a column range: 'A:A' or 'B:G'.
    # A range such as A:A is equivalent to A1:65536, so add rows as required
    if cell =~ /\$?([A-I]?[A-Z]):\$?([A-I]?[A-Z])/
      row1, col1 =  cell_to_rowcol($1 +'1')
      row2, col2 =  cell_to_rowcol($2 +'65536')
      return [row1, col1, row2, col2, *args]
    end

    # Convert a cell range: 'A1:B7'
    if cell =~ /\$?([A-I]?[A-Z]\$?\d+):\$?([A-I]?[A-Z]\$?\d+)/
      row1, col1 =  cell_to_rowcol($1)
      row2, col2 =  cell_to_rowcol($2)
      return [row1, col1, row2, col2, *args]
    end

    # Convert a cell reference: 'A1' or 'AD2000'
    if (cell =~ /\$?([A-I]?[A-Z]\$?\d+)/)
      row1, col1 =  cell_to_rowcol($1)
      return [row1, col1, *args]

    end

    raise("Unknown cell reference #{cell}")
  end
437906
def _fill(self, values):
        """"""
        if not self._previous_line:
            self._previous_line = values
            return super(StackedLine, self)._fill(values)
        new_values = values + list(reversed(self._previous_line))
        self._previous_line = values
        return new_values
756115
def clean_up(self):#, grid):
        
        if self.selected_col:
            col_label_value = self.grid.GetColLabelValue(self.selected_col)
            col_label_value = col_label_value.strip('\nEDIT ALL')
            self.grid.SetColLabelValue(self.selected_col, col_label_value)
            for row in range(self.grid.GetNumberRows()):
                self.grid.SetCellBackgroundColour(row, self.selected_col, 'white')
        self.grid.ForceRefresh()
1015651
def _fill(self, values):
        """"""
        zero = self.view.y(min(max(self.zero, self._box.ymin), self._box.ymax))

        # Check to see if the data has been padded with "none's"
        # Fill doesn't work correctly otherwise
        end = len(values) - 1
        while end > 0:
            x, y = values[end]
            if self.missing_value_fill_truncation == "either":
                if x is not None and y is not None:
                    break
            elif self.missing_value_fill_truncation == "x":
                if x is not None:
                    break
            elif self.missing_value_fill_truncation == "y":
                if y is not None:
                    break
            else:
                raise ValueError(
                    "Invalid value ({}) for config key "
                    "'missing_value_fill_truncation';"
                    " Use 'x', 'y' or 'either'".format(
                        self.missing_value_fill_truncation
                    )
                )
            end -= 1

        return ([(values[0][0], zero)] + values + [(values[end][0], zero)])
197372
function _checkAndTransformColumns (columns) {
  var returnValue = null;

  if (columns) {
    _checkColumns(columns);

    returnValue = {};
    Object.keys(columns).forEach(function (key) {
      returnValue[key] = _columnToSnakeCase(columns[key]);
    });
  }
  return returnValue;
}
593381
def map_column(self, value):
        
        if value in self.null_values:
            return r'\\N'
        else:
            return default_escape(six.text_type(value))