add two columns that contain numbers as strings
762898
def clean_add_strdec(*args, prec=28):
    """"""

    # load modules
    import pandas as pd
    import numpy as np
    import re
    from decimal import Decimal, getcontext
    getcontext().prec = prec

    # initialize result as 0.0
    def proc_elem(*args):
        t = Decimal('0.0')
        for a in args:
            if isinstance(a, str):
                a = re.sub('[^0-9\.\-]+', '', a)

            if a and pd.notnull(a):
                t += Decimal(a)

        return str(t)

    def proc_list(arr):
        return [proc_elem(*row) for row in arr]

    def proc_ndarray(arr):
        return np.array(proc_list(arr))

    # transform depending on provided datatypes
    if isinstance(args[0], (list, tuple)):
        return proc_list(args[0])
    elif isinstance(args[0], np.ndarray):
        return proc_ndarray(args[0])
    elif isinstance(args[0], pd.DataFrame):
        return pd.DataFrame(proc_ndarray(args[0].values),
                            index=args[0].index)
    else:
        return proc_elem(*args)
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);
		}
	}
605071
def concat_with_pipe(x, cols=None):
    """"""
    cols = cols or x.index
    return '|'.join([x[i] for i in cols if x[i] not in [None, np.nan]])
478727
def add(self, *number):
        """"""
        return self._format_result(sum(
            # positional arguments are always strings
            [int(n) for n in number]))
1082144
private void setNumeric(PreparedStatement stmt,
                            int varIndex,
                            String columnName,
                            String value) throws SQLException {
        try {
            stmt.setInt(varIndex, Integer.parseInt(value));
        } catch (NumberFormatException e) {
            try {
                stmt.setLong(varIndex, Long.parseLong(value));
            } catch (NumberFormatException e2) {
                throw new SQLException("Value specified for " + columnName
                        + ", '" + value + "' was"
                        + " specified as numeric, but is not");
            }
        }
    }
39318
def column_converter(string):
    
    column = string.strip(',')
    if '-' in column:
        column_range = map(int, column.split('-'))
        # For decreasing ranges, increment the larger value, reverse the
        # passing to range (so it will accept the input), and finally
        # reverse the output ([::-1])
        if column_range[0] > column_range[1]:
            column_range[0] += 1
            return [i for i in range(*column_range[::-1])][::-1]
        # For normal ranges, increment the larger value.
        column_range[1] += 1
        return [i for i in range(*column_range)]
    if ',' in column:
        columns = column.split(',')
        return map(int, columns)
    return [int(column)]
333876
private static String concat(Collection<String> col)
	{
		StringBuilder b = new StringBuilder();
		boolean first = true;
		for (String s : col)
		{
			if (first)
				first = false;
			else
				b.append(";");

			b.append(s);
		}
		return b.toString();
	}
644132
def col_name2cat(column):
    
    column_string = ''.join(s for s in column.replace(' ', '_') if s.isalnum() or '_' == s)
    return column_string
748744
def numeric_columns(self, include_bool=True):
        
        columns = []
        for col, dtype in zip(self.columns, self.dtypes):
            if is_numeric_dtype(dtype) and (
                include_bool or (not include_bool and dtype != np.bool_)
            ):
                columns.append(col)
        return columns
965717
def _get_columns_as_string(self):
        """"""
        columnslist = []
        for rowidx, row in self.columns.iterrows():
            columnslist.append("#%s = %s" % (rowidx, row.description))
        return "\n".join(columnslist)
1118593
def add_numbers():
    """"""
    a = request.params.get('a', 0, type=int)
    b = request.params.get('b', 0, type=int)
    return json.dumps({'result': a+b})
562741
function appendJoinRow(arrayCols, keyDf, leftNonKeyDf, rightNonKeyDf,
  leftInd, rightInd, indicatorValue, rightIndForKey) {

  var keyInd = rightIndForKey ? rightInd : leftInd;
  var i, nCol;
  var colInd = 0;
  nCol = keyDf.nCol();
  for (i = 0; i < nCol; i++) {
    arrayCols[colInd].push(keyDf._cols[i].values[keyInd]);
    colInd++;
  }
  nCol = leftNonKeyDf.nCol();
  for (i = 0; i < nCol; i++) {
    var leftVal = (leftInd === null) ? null :
      leftNonKeyDf._cols[i].values[leftInd];
    arrayCols[colInd].push(leftVal);
    colInd++;
  }
  nCol = rightNonKeyDf.nCol();
  for (i = 0; i < nCol; i++) {
    var rightVal = (rightInd === null) ? null :
      rightNonKeyDf._cols[i].values[rightInd];
    arrayCols[colInd].push(rightVal);
    colInd++;
  }
  if (colInd < arrayCols.length) {
    // Add the join indicator value if there's a final column for it
    arrayCols[colInd].push(indicatorValue);
  }
}
193149
def NumbersToWords(number):
    

    units = [
        'one',
        'two',
        'three',
        'four',
        'five',
        'six',
        'seven',
        'eight',
        'nine']
    tens = [
        'ten',
        'twenty',
        'thirty',
        'forty',
        'fifty',
        'sixty',
        'seventy',
        'eighty',
        'ninety']
    output = ""
    if number != 0:
        str_val = str(number)
        if 4 > len(str_val) > 2:
            output += units[int(str_val[0]) - 1]
            output += "hundred"
            if str_val[1] != 0:
                output += "and" + tens[int(str_val[1]) - 1]
                if str_val[2] != 0:
                    output += units[int(str_val[2]) - 1]
        if 3 > len(str_val) > 1:
            output += tens[int(str_val[0]) - 1]
            if str_val[1] != 0:
                output += units[int(str_val[1]) - 1]
        if 2 > len(str_val) == 1:
            output += units[int(str_val[0]) - 1]
    else:
        output = "zero"
    return output
551598
def _by_columns(self, columns):
        
        return columns if self.isstr(columns) else self._backtick_columns(columns)
613480
def ColumnToIndex (col):
        """"""
        ndx = 0
        for c in col:
                ndx = ndx * 26 + ord(c.upper()) - 64
        return ndx
66010
def safe_add(a, b):
    """"""
    if isinstance(a, str) and isinstance(b, str) and len(a) + len(b) > MAX_STR_LEN:
        raise RuntimeError("String length exceeded, max string length is {}".format(MAX_STR_LEN))
    return a + b
1220901
def add_column(self, column):
        """"""
        self.columns.append(column.name)
        self.column_funcs.append(column.path)

        if column.mask is not None:
            self.mask_parts.add(column.mask)