Data
From Future Skill
Revision as of 12:54, 19 March 2024 by Henrik Rostedt (talk | contribs) (Created page with "This article goes through how to use the Data library to manage data and create tables in the canvas. == Overview == The library can currently only be used to make tables, b...")
Revision as of 12:54, 19 March 2024 by Henrik Rostedt (talk | contribs) (Created page with "This article goes through how to use the Data library to manage data and create tables in the canvas. == Overview == The library can currently only be used to make tables, b...")
This article goes through how to use the Data library to manage data and create tables in the canvas.
Overview
The library can currently only be used to make tables, but other types of data views might be available in the future.
TODO
Tables
TODO
DataTable
The DataTable
class is used to create tables by manually entering data.
This is done through indexing:
table = DataTable(header_row_count=1) table[1, 1] = 5 # Set value for a single table cell table[0, :] = ["Name", "Count"] # Set values for multiple cells (first row) table[1:, :] = [["Jane", 9], ["Joe", 7]] # Set values for multiple rows and columns # table will now contain: # |------|-------| # | Name | Count | # |------|-------| # | Jane | 9 | # |------|-------| # | Joe | 7 | # |------|-------|
The same indexing syntax can be used to extract data from the table.
You will have to manually specify the number of header/footer rows and columns using header_row_count
, header_column_count
, footer_row_count
, and footer_column_count
.