pyexcel.sheets.Matrix¶
-
class
pyexcel.sheets.Matrix(array)[source]¶ The internal representation of a sheet data. Each element can be of any python types
-
__init__(array)[source]¶ Constructor
The reason a deep copy was not made here is because the data sheet could be huge. It could be costly to copy every cell to a new memory area :param list array: a list of arrays
Methods
__init__(array)Constructor add_filter(afilter)Apply a filter add_formatter(aformatter)Add a lazy formatter. apply_formatter(aformatter)Apply the formatter immediately cell_value(row, column[, new_value])Random access to table cells clear_filters()Clears all filters clear_formatters()Clear all formatters column_at(index)Gets the data at the specified column column_range()Utility function to get column range columns()Returns a left to right column iterator contains(predicate)Has something in the table cut(topleft_corner, bottomright_corner)Get a rectangle shaped data out and clear them in position delete_columns(column_indices)Delete columns by specified list of indices delete_rows(row_indices)Deletes specified row indices enumerate()Iterate cell by cell from top to bottom and from left to right extend_columns(columns)Inserts two dimensional data after the rightmost column extend_columns_with_rows(rows)Rows were appended to the rightmost side extend_rows(rows)Inserts two dimensional data after the bottom row filter([column_indices, row_indices])Apply the filter with immediate effect format(formatter)Apply a formatting action for the whole sheet freeze_filters()Apply all filters and delete them freeze_formatters()Apply all added formatters and clear them map(custom_function)Execute a function across all cells of the sheet number_of_columns()The number of columns number_of_rows()The number of rows paste(topleft_corner[, rows, columns])Paste a rectangle shaped data after a position rcolumns()Returns a right to left column iterator region(topleft_corner, bottomright_corner)Get a rectangle shaped data out remove_filter(afilter)Remove a named filter remove_formatter(aformatter)Remove a formatter reverse()Opposite to enumerate row_at(index)Gets the data at the specified row row_range()Utility function to get row range rows()Returns a top to bottom row iterator rrows()Returns a bottom to top row iterator rvertical()Default iterator to go through each cell one by one from rightmost set_column_at(column_index, data_array[, ...])Updates a column data range set_row_at(row_index, data_array)Update a row data range to_array()Get an array out transpose()Rotate the data table by 90 degrees validate_filters()Re-apply filters vertical()Default iterator to go through each cell one by one from -