def vertical(self): """ Default iterator to go through each cell one by one from leftmost column to rightmost row and from top to bottom example:: import pyexcel as pe data = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] m = pe.Matrix(data) print(list(m.vertical())) output:: [1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12] More details see :class:`VTLBRIterator` """ return chain(*compact.czip(*self.__array))
def vertical(self): """ Default iterator to go through each cell one by one from leftmost column to rightmost row and from top to bottom example:: import pyexcel as pe data = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] m = pe.internal.sheets.Matrix(data) print(list(m.vertical())) output:: [1, 5, 9, 2, 6, 10, 3, 7, 11, 4, 8, 12] More details see :class:`VTLBRIterator` """ return chain(*compact.czip(*self.__array))
def rcolumns(self): """ Returns a right to left column iterator example:: import pyexcel as pe data = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] m = pe.Matrix(data) print(pe.utils.to_array(m.rcolumns())) output:: [[4, 8, 12], [3, 7, 11], [2, 6, 10], [1, 5, 9]] More details see :class:`ColumnReverseIterator` """ for column in compact.czip(*(reversed(row) for row in self.__array)): yield list(column)
def columns(self): """ Returns a left to right column iterator .. testcode:: import pyexcel as pe data = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] m = pe.Matrix(data) print(list(m.columns())) .. testoutput:: [[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]] More details see :class:`ColumnIterator` """ for row in compact.czip(*self.__array): yield list(row)
def rcolumns(self): """ Returns a right to left column iterator example:: import pyexcel as pe data = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] m = pe.internal.sheets.Matrix(data) print(pe.utils.to_array(m.rcolumns())) output:: [[4, 8, 12], [3, 7, 11], [2, 6, 10], [1, 5, 9]] More details see :class:`ColumnReverseIterator` """ for column in compact.czip(*(reversed(row) for row in self.__array)): yield list(column)
def columns(self): """ Returns a left to right column iterator .. testcode:: import pyexcel as pe data = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] m = pe.internal.sheets.Matrix(data) print(list(m.columns())) .. testoutput:: [[1, 5, 9], [2, 6, 10], [3, 7, 11], [4, 8, 12]] More details see :class:`ColumnIterator` """ for row in compact.czip(*self.__array): yield list(row)
def rvertical(self): """ Default iterator to go through each cell one by one from rightmost column to leftmost row and from bottom to top example:: import pyexcel as pe data = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] m = pe.Matrix(data) print(pe.utils.to_array(m.rvertical()) output:: [12, 8, 4, 11, 7, 3, 10, 6, 2, 9, 5, 1] More details see :class:`VBRTLIterator` """ for column in compact.czip(*(reversed(row) for row in self.__array)): for cell in reversed(column): yield cell
def rvertical(self): """ Default iterator to go through each cell one by one from rightmost column to leftmost row and from bottom to top example:: import pyexcel as pe data = [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ] m = pe.internal.sheets.Matrix(data) print(pe.utils.to_array(m.rvertical()) output:: [12, 8, 4, 11, 7, 3, 10, 6, 2, 9, 5, 1] More details see :class:`VBRTLIterator` """ for column in compact.czip(*(reversed(row) for row in self.__array)): for cell in reversed(column): yield cell