Twin reduction table
Create a new Table
Union[pandas.core.frame.DataFrame, numpy.ndarray, list]
- None
List
- None
List
- None
List
- None
List
- None
bool
- False
Add a new column to the Dataframe.
str
Union[list, pandas.core.series.Series]
- None
int
- None
Add a tag to a column at a given index
int
str
str
Add a tag to a column by name
str
str
str
Add a row to the Dataframe.
str
Union[list, pandas.core.series.Series]
- None
int
- None
Add a tag to a row at a given index
int
str
str
Add a tag to a row by name
str
str
str
Add technical information on the resource. Technical info are useful to set additional information on the resource.
TechnicalInfo
Checks if a column with the given name exists in the Table and raises an exception if it doesn't.
str
bool
- True
You can redefine this method to define custom logic to check this resource. If there is a problem with the resource, return a string that define the error, otherwise return None This method is called on output resources of a task. If there is an error returned, the task will be set to error and next proceses will not be run. It is also call when uploading a resource (usually for files or folder), if there is an error returned, the resource will not be uploaded
Union[str, NoneType]
Checks if a row with the given name exists in the Table and raises an exception if it doesn't.
str
bool
- True
Clone the resource to create a new instance with a new id. It copies the RFields.
ResourceType
Checks if a column with the given name exists in the Table.
str
bool
- True
bool
Copy column tags from source_table to self matching by index.
Table
int
- None
int
- None
Copy column tags from source_table to self matching by name.
Table
Copy row tag from source_table to self matching by index
Table
int
- None
int
- None
Copy row tag from source_table to self matching by name
Table
Create a new table from a dataframe and a meta
DataFrame
List
List
Table
Create a sub Table based on a subset Dataframe of this original table filtered by columns It copies the tags of this table into the new table based on column names that matched between filtered_df and this dataframe.
DataFrame
Table
Create a sub Table based on a subset Dataframe of this original table filtered by rows. It copies the tags of this table into the new table based on row names that matched between filtered_df and this dataframe.
DataFrame
Table
Check if the table is equal to another table. It compares the data, row tags and column tags.
object
bool
Create a new row and fill it with the values of the tag of each column.
str
str
- None
Create a new tag for each row and fill it with the values of the provided column
str
str
- None
bool
- False
Create a new columns and fill it with the values of the tag of each row
str
str
- None
Create a new tag for each column and fill it with the values of the row.
str
str
- None
bool
- False
Filter out table columns matching a list of names, return a new table
List
Table
Filter out table rows matching a list of names, return a new table
List
Table
Filter out table rows or columns matching a list of tags and return a new table. The row or column that matches the tags are removed.
Example of search tags are:
tags = [ {"key1": "value1"} ]
to filter out rows or columns having a tag{"key1": "value1"}
tags = [ {"key1": "value1", "key2": "value2"} ]
to filter out rows or columns having tags{"key1": "value1"} AND {"key2": "value2"}
tags = [ {"key1": "value1"}, {"key2": "value2"} ]
to filter out rows or columns having tags{"key1": "value1"} OR {"key2": "value2"}
tags = [ {"key1": "value1", "key2": "value2"}, {"key3": "value3"} ]
to filter out rows or columns having tags({"key1": "value1"} AND {"key2": "value2"}) OR {"key2": "value2"}
- AND and OR logics can further be combined to perform complex selects
Literal[0, 1, 'index', 'columns']
List
Table
Generates a column name that is unique in the Dataframe base on name. If the column name doesn't exist, return name, otherwise return name_1 or name_2, ... Only the name is returned, the column is not added to the Dataframe.
str
str
Get the available tags for each column.
Dict
Get the available tags for each row.
Dict
Get the value of a cell at a given coordonate (row, column)
int
int
Any
Returns a column with the given name as a DataFrame.
str
bool
- False
DataFrame
Returns the data of a column with the given name.
str
bool
- False
List
Get the index of a column from its name
str
int
Get the info of a column by name
str
TableColumnInfo
Get the column names
int
- None
int
- None
List
Function to retrieve the column names based on column indexes
List
List
Get the tags of multiple columns by index
int
- None
int
- None
bool
- False
List
Get the tags of a column at a given index
int
Dict
Get the tags of a column by name
str
Dict
Get the type of a column
Any
TableColumnType
Get the info of multiple columns by index
int
- None
int
- None
List
DataFrame
You can redefine this method to set a name of the resource. When saving the resource the name will be saved automatically This can be useful to distinguish this resource from another one or to search for the resource
str
Returns the data of a row with the given name.
str
bool
- False
List
Get the index of a row from its name. Raise an exception if the row doesn't exist
str
int
Get the info of a row by name
str
TableHeaderInfo
Get the row names of the table by index
int
- None
int
- None
List
Function to retrieve the row names based on row indexes
List
List
Get the tags of a row by name
str
Dict
Get the tags of multiple rows by index
int
- None
int
- None
bool
- False
List
Get the tags of a row at a given index
int
Dict
Get the info of multiple rows by index
int
- None
int
- None
List
Get the tags of a given axis
Literal[0, 1, 'index', 'columns']
List
Get the technical information of the resource
str
TechnicalInfo
Returns the first n rows for the columns ant targets.
int
- 5
DataFrame
Call infer_objects on the underlying dataframe, it modifies the table dataframe.
Table
This can be overwritten to perform custom initialization of the resource. This method is called just after the init (constructor) of the resource. The default values of RFields are set before this method is called.
Remove a column from the Dataframe.
str
Remove a row from the Dataframe.
str
Checks if a row with the given name exists in the Table.
str
bool
- True
bool
Select table columns matching a list of indexes, return a new table
List
Table
Select table columns matching a list of names, return a new table
List
Table
Select table columns matching a list of tags
Example of search tags are:
tags = [ {"key1": "value1"} ]
to select columns having a tag{"key1": "value1"}
tags = [ {"key1": "value1", "key2": "value2"} ]
to select columns having tags{"key1": "value1"} AND {"key2": "value2"}
tags = [ {"key1": "value1"}, {"key2": "value2"} ]
to select columns having tags{"key1": "value1"} OR {"key2": "value2"}
tags = [ {"key1": "value1", "key2": "value2"}, {"key3": "value3"} ]
to select columns having tags({"key1": "value1"} AND {"key2": "value2"}) OR {"key2": "value2"}
- AND and OR logics can further be combined to perform complex selects
List
Table
Create a new table from coords. It does not includes the to_row_id and to_column_id
int
int
int
int
Table
Select table rows matching a list of indexes, return a new table
List
Table
Select table rows matching a list of names, return a new table
List
Table
Select table rows matching a list of tags
Example of search tags are:
tags = [ {"key1": "value1"} ]
to select rows having a tag{"key1": "value1"}
tags = [ {"key1": "value1", "key2": "value2"} ]
to select rows having tags{"key1": "value1"} AND {"key2": "value2"}
tags = [ {"key1": "value1"}, {"key2": "value2"} ]
to select rows having tags{"key1": "value1"} OR {"key2": "value2"}
tags = [ {"key1": "value1", "key2": "value2"}, {"key3": "value3"} ]
to select rows having tags({"key1": "value1"} AND {"key2": "value2"}) OR {"key2": "value2"}
- AND and OR logics can further be combined to perform complex selects
List
Table
Select table rows or columns matching a list of tags and return a new table
Example of search tags are:
tags = [ {"key1": "value1"} ]
to select rows or columns having a tag{"key1": "value1"}
tags = [ {"key1": "value1", "key2": "value2"} ]
to select rows or columns having tags{"key1": "value1"} AND {"key2": "value2"}
tags = [ {"key1": "value1"}, {"key2": "value2"} ]
to select rows or columns having tags{"key1": "value1"} OR {"key2": "value2"}
tags = [ {"key1": "value1", "key2": "value2"}, {"key3": "value3"} ]
to select rows or columns having tags({"key1": "value1"} AND {"key2": "value2"}) OR {"key2": "value2"}
- AND and OR logics can further be combined to perform complex selects
Literal[0, 1, 'index', 'columns']
List
Table
Select only numeric columns, return a new table
Literal['all', 'any']
- all
Table
Set the names of all columns
List
Set the tags of all columns, the length of the list must be equal to the number of columns
List
Set the names of all rows
List
Set the tags of all rows, the length of the list must be equal to the number of rows
List
Set the value of a cell at a given coordonate (row, column)
int
int
Any
Set the name of a column at a given index
str
str
Set the tags of a column at a given index
int
Dict
Set the tags of a column by name
str
Dict
str
- ''
Update the name of a row
Any
str
Set the tags of a row at a given index
int
Dict
Set the tags of a row by name
str
Dict
Returns the last n rows for the columns ant targets.
int
- 5
DataFrame
Returns the table as a csv string.
str
Returns the table as a pandas dataframe.
DataFrame
Returns the table as a json string.
dict
Returns the table as a list of lists.
List
Returns the table as a numpy array.
ndarray
Transpose the table, it returnes a new Table, the original table is not modified.
bool
- False
Table