pyexcel.internal.sheets.Matrix¶
-
class
pyexcel.internal.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 cell_value(row, column[, new_value])Random access to table cells clone()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 get_array(**keywords)Get data in array format get_bookdict(**keywords)Get data in bookdict format get_csv(**keywords)Get data in csv format get_csvz(**keywords)Get data in csvz format get_dict(**keywords)Get data in dict format get_fods(**__)fods getter is not defined. Matrix.get_gridget_handsontable(**keywords)Get data in handsontable format get_handsontable_html(**keywords)Get data in handsontable.html format get_html(**__)html getter is not defined. get_internal_array()present internal array Matrix.get_jsonMatrix.get_latexMatrix.get_latex_booktabsMatrix.get_mediawikiMatrix.get_ndjsonget_ods(**keywords)Get data in ods format Matrix.get_orgtblMatrix.get_pipeMatrix.get_plainget_records(**keywords)Get data in records format Matrix.get_rstMatrix.get_simpleget_svg(**keywords)Get data in svg format get_texttable(**keywords)Get data in texttable format get_tsv(**keywords)Get data in tsv format get_tsvz(**keywords)Get data in tsvz format get_url(**__)url getter is not defined. get_xls(**keywords)Get data in xls format get_xlsm(**keywords)Get data in xlsm format get_xlsx(**keywords)Get data in xlsx format 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 plot([file_type])Visualize the data rcolumns()Returns a right to left column iterator region(topleft_corner, bottomright_corner)Get a rectangle shaped data out register_input(file_type[, instance_name, …])partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords. register_io(file_type[, instance_name, …])partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords. register_presentation(file_type[, …])partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords. 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 column to leftmost row and from bottom to top example. save_as(filename, **keywords)Save the content to a named file save_to_database(session, table[, …])Save data in sheet to database table save_to_django_model(model[, initializer, …])Save to database table through django model save_to_memory(file_type[, stream])Save the content to memory set_array(content, **keywords)Set data in array format set_bookdict(content, **keywords)Set data in bookdict format set_column_at(column_index, data_array[, …])Updates a column data range set_csv(content, **keywords)Set data in csv format set_csvz(content, **keywords)Set data in csvz format set_dict(content, **keywords)Set data in dict format set_fods(content, **keywords)Set data in fods format Matrix.set_gridset_handsontable(_y, **_z)handsontable setter is not defined. set_handsontable_html(_y, **_z)handsontable.html setter is not defined. set_html(content, **keywords)Set data in html format Matrix.set_jsonMatrix.set_latexMatrix.set_latex_booktabsMatrix.set_mediawikiMatrix.set_ndjsonset_ods(content, **keywords)Set data in ods format Matrix.set_orgtblMatrix.set_pipeMatrix.set_plainset_records(content, **keywords)Set data in records format set_row_at(row_index, data_array)Update a row data range Matrix.set_rstMatrix.set_simpleset_svg(_y, **_z)svg setter is not defined. set_texttable(_y, **_z)texttable setter is not defined. set_tsv(content, **keywords)Set data in tsv format set_tsvz(content, **keywords)Set data in tsvz format set_url(content, **keywords)Set data in url format set_xls(content, **keywords)Set data in xls format set_xlsm(content, **keywords)Set data in xlsm format set_xlsx(content, **keywords)Set data in xlsx format to_array()Get an array out transpose()Rotate the data table by 90 degrees vertical()Default iterator to go through each cell one by one from leftmost column to rightmost row and from top to bottom example. Attributes
arrayGet/Set data in/from array format bookdictGet/Set data in/from bookdict format csvGet/Set data in/from csv format csvzGet/Set data in/from csvz format dictGet/Set data in/from dict format fodsSet data in fods format Matrix.gridhandsontableGet data in handsontable format handsontable_htmlGet data in handsontable.html format htmlSet data in html format Matrix.jsonMatrix.latexMatrix.latex_booktabsMatrix.mediawikiMatrix.ndjsonodsGet/Set data in/from ods format Matrix.orgtblMatrix.pipeMatrix.plainrecordsGet/Set data in/from records format Matrix.rstMatrix.simplestreamReturn a stream in which the content is properly encoded svgGet data in svg format texttableGet data in texttable format tsvGet/Set data in/from tsv format tsvzGet/Set data in/from tsvz format urlSet data in url format xlsGet/Set data in/from xls format xlsmGet/Set data in/from xlsm format xlsxGet/Set data in/from xlsx format -