DataFrame column number
432483
def columnCount(self, index=QModelIndex()):
        """"""
        # Avoid a "Qt exception in virtual methods" generated in our
        # tests on Windows/Python 3.7
        # See PR 8910
        try:
            # This is done to implement series
            if len(self.df.shape) == 1:
                return 2
            elif self.total_cols <= self.cols_loaded:
                return self.total_cols
            else:
                return self.cols_loaded
        except AttributeError:
            return 0
897987
def _idx_col2rowm(d):
    """"""
    if 0 == len(d):
        return 1
    if 1 == len(d):
        return np.arange(d[0])
    # order='F' indicates column-major ordering
    idx = np.array(np.arange(np.prod(d))).reshape(d, order='F').T
    return idx.flatten(order='F')
41340
def get_column_header_for_number(self, column_var_names, header=False):
        """"""
        if not header:
            header = self.oldheader
        for col in column_var_names:
            value = getattr(self, col)
            if not value or value is None:
                continue
            setattr(self, col, self.number_to_headerfield(value, header))
855318
def column_coordinates(self, X):
        """"""
        utils.validation.check_is_fitted(self, 'V_')

        _, _, _, col_names = util.make_labels_and_names(X)

        if isinstance(X, pd.SparseDataFrame):
            X = X.to_coo()
        elif isinstance(X, pd.DataFrame):
            X = X.to_numpy()

        if self.copy:
            X = X.copy()

        # Transpose and make sure the rows sum up to 1
        if isinstance(X, np.ndarray):
            X = X.T / X.T.sum(axis=1)[:, None]
        else:
            X = X.T / X.T.sum(axis=1)

        return pd.DataFrame(
            data=X @ sparse.diags(self.row_masses_.to_numpy() ** -0.5) @ self.U_,
            index=col_names
        )
543058
def count(self):
        
        try:
            num = len(self.df.index)
        except Exception as e:
            self.err(e, "Can not count data")
            return
        self.ok("Found", num, "rows in the dataframe")
815062
def columnCount(self, row=None):
        
        if row is not None:
            wholerow = self._segments[row]
            return len(wholerow)
        else:
            column_lengths = [len(x) for x in self._segments]
            return max(column_lengths)
1090400
def col(self, col_name_or_num):
        
        if isinstance(col_name_or_num, basestring):
            return self[col_name_or_num]
        elif isinstance(col_name_or_num, (int, long)):
            if col_name_or_num > len(self.fields):
                raise IndexError("Invalid column index `%s` for DataTable" %
                                 col_name_or_num)
            return self.__data[self.fields[col_name_or_num]]
1203903
@Override
	public int getColumnNumber() {
		int result = bufferStartColumn;
		for (int i = 0; i < position; i++) {
			if (buffer[i] == '\n') {
				result = 0;
			} else {
				result++;
			}
		}
		return result + 1; // the first column is '1'
	}
1165519
def column( self, name ):
        
        columns = self.columns()
        if ( name in columns ):
            return columns.index(name)
        return -1
129735
def calc_columns_rows(n):
    
    num_columns = int(ceil(sqrt(n)))
    num_rows = int(ceil(n / float(num_columns)))
    return (num_columns, num_rows)
1058751
def _get_column_type(self,column):
        
        ctype = column.GetType()
        if ctype in [ogr.OFTInteger, ogr.OFTReal]:
            return 'numeric'
        else:
            return 'string'
375351
def drop_nan_columns(df, thresh=325):
    
    if thresh < 1:
        thresh = int(thresh * df)
    return df.dropna(axis=1, thresh=thresh, inplace=False)
95424
def cols_(self) -> pd.DataFrame:
        
        try:
            s = self.df.iloc[0]
            df = pd.DataFrame(s)
            df = df.rename(columns={0: "value"})

            def run(row):
                t = row[0]
                return type(t).__name__

            s = df.apply(run, axis=1)
            df = df.rename(columns={0: "value"})
            df["types"] = s
            return df
        except Exception as e:
            self.err(e)
397186
def cols_str(columns):
    """"""
    cols = ""
    for c in columns:
        cols = cols + wrap(c) + ', '
    return cols[:-2]
852039
def calculate_columns(self):
        """"""

        self.cols = int(math.ceil(len(self.elements) / float(self.rows)))
896488
function abecidianToColumnNumber(code) {
	var column = 0;
	for (var c = 0; c < code.length; c += 1) {
		var letter = code[code.length - 1 - c];
		var value = letter.charCodeAt(0) - 64;
		column += value * Math.pow(26, c);
	}
	return column;
}
625736
def count(self, *columns):
        
        if not columns and self.distinct_:
            columns = self.columns

        if not columns:
            columns = ["*"]

        return int(self.aggregate("count", *columns))