TableRowAnnotatorHelper
Annotate the rows of a sample_table
using information from a metadata_table
.
- all the row values of the reference column of the
sample_table
are matched against theids
of themetadata_table
. - if an
id
matches against a reference value of thesample_table
, the corresponding row of thesample_table
is taggeg with the metadata given by theid
.
Functions
annotate_columns @classmethod
Annotate the columns of a table
using information from a metadata_table
.
All the column values of the reference row of the table
are matched against the ids
of the metadata_table
.
If an id
matches against a reference value of the table
, the corresponding column of the table
is tagged with the metadata given by the id
.
table :
Table
the table to annotate
metadata_table :
Table
the metadata table
table_ref_row :
str
ref row of the table to match against the metadata table
If None or empty, the first row is used
metadata_table_ref_column :
str
ref column of the metadata table to match against the table
If None or empty, the first column is used
use_table_column_names_as_ref :
bool
- False
use_metadata_row_names_as_ref :
bool
- False
Return type :
Table
annotate_rows @classmethod
Annotate the rows of a table
using information from a metadata_table
.
All the row values of the reference column of the table
are matched against the ids
of the metadata_table
.
If an id
matches against a reference value of the table
, the corresponding row of the table
is tagged with the metadata given by the id
.
table :
Table
the table to annotate
metadata_table :
Table
the metadata table
table_ref_column :
str
ref column of the table to match against the metadata table
If None or empty, the first column is used
metadata_table_ref_column :
str
ref column of the metadata table to match against the table
If None or empty, the first column is used
use_table_row_names_as_ref :
bool
- False
use_metadata_row_names_as_ref :
bool
- False
Return type :
Table