Return a column of the given matrix.

        Args:
            X: `numpy.ndarray` or `pandas.DataFrame`.
            column: `int` or `str`.

        Returns:
            np.ndarray: Selected column.
483460
def get_column(self, X, column):
        
        if isinstance(X, pd.DataFrame):
            return X[column].values

        return X[:, column]
439996
def cell(self, row_idx, col_idx):
        
        cell_idx = col_idx + (row_idx * self._column_count)
        return self._cells[cell_idx]
623466
def indexcol(self, col: str):
        
        try:
            self.df[col] = self.df.index.values
        except Exception as e:
            self.err(e)
            return
        self.ok("Column", col, "added from the index")
820957
def _axis(self, axis):
        
        return self.df.columns if axis == 0 else self.df.index
219890
public IVector getVectorFromColumn(int index) {
        IVector result = new IVector(rows);
        for (int i = 0; i < rows; i++) {
            result.realvector[i] = realmatrix[i][index];
            result.imagvector[i] = imagmatrix[i][index];
        }
        return result;
    }
175684
def idx(df, index):
    """"""
    if isinstance(df, (pd.DataFrame, pd.Series)):
        return df.iloc[index]
    else:
        return df[index, :]
870602
def get_column(self, column_name):
        
        frame = self._call_func()
        return DataFrameWrapper(self.name, frame,
                                copy_col=self.copy_col).get_column(column_name)
899572
def _vector_or_scalar(x, type='row'):
    """"""
    if isinstance(x, (list, tuple)):
        x = np.array(x)
    if isinstance(x, np.ndarray):
        assert x.ndim == 1
        if type == 'column':
            x = x[:, None]
    return x
712567
def columns(self):
        
        return Index(np.array(self._gather_column_names(), dtype=np.bytes_), np.dtype(np.bytes_))
1066417
def num_row(self):
        
        ret = ctypes.c_ulong()
        _check_call(_LIB.XGDMatrixNumRow(self.handle,
                                         ctypes.byref(ret)))
        return ret.value
187900
def get_column(self, column):
		
		if column.lower() == 'q':
			return self.get_q
		else:
			return self.getColumnByName(column).asarray()
545770
def select(self, *columns):
        
        if not columns:
            columns = ["*"]

        self.columns = list(columns)

        return self
687817
def as_indexable(array):
    
    if isinstance(array, ExplicitlyIndexed):
        return array
    if isinstance(array, np.ndarray):
        return NumpyIndexingAdapter(array)
    if isinstance(array, pd.Index):
        return PandasIndexAdapter(array)
    if isinstance(array, dask_array_type):
        return DaskIndexingAdapter(array)
    raise TypeError('Invalid array type: {}'.format(type(array)))
277273
def to_numpy(self):
        
        import numpy as np
        cols, rows = self.GetNcols(), self.GetNrows()
        return np.matrix([[self(i, j)
            for j in range(cols)]
            for i in range(rows)])
919261
def _retrieve_indices(cols):
        '''
        
        '''
        if isinstance(cols, int):
            return [cols]
        elif isinstance(cols, slice):
            start = cols.start if cols.start else 0
            stop = cols.stop
            step = cols.step if cols.step else 1
            return list(range(start, stop, step))
        elif isinstance(cols, list) and cols:
            if isinstance(cols[0], bool):
                return np.flatnonzero(np.asarray(cols))
            elif isinstance(cols[0], int):
                return cols
        else:
            raise TypeError('No valid column specifier. Only a scalar, list or slice of all'
                            'integers or a boolean mask are allowed.')
279046
def X(self) -> Optional[Union[np.ndarray, sparse.spmatrix, ArrayView]]:
        """"""
        if self.isbacked:
            if not self.file.isopen: self.file.open()
            X = self.file['X']
            if self.isview:
                X = X[self._oidx, self._vidx]
            return X
        else:
            if self.n_obs == 1 and self.n_vars == 1:
                return self._X[0, 0]
            elif self.n_obs == 1 or self.n_vars == 1:
                X = self._X
                if issparse(self._X): X = self._X.toarray()
                return X.flatten()
            else:
                return self._X
1234541
def get_value(self, column=0, row=0):
        
        x = self._widget.item(row, column)

        if x==None: return x
        else:       return str(self._widget.item(row,column).text())