macpie.AnchoredList#
- class macpie.AnchoredList(primary: Dataset | None = None, secondary: BasicList | None = None)#
A collection of Datasets where one is considered the primary or anchor Dataset, and the rest are considered secondary Datasets.
- Parameters:
- primaryDataset
The primary anchor Dataset of the collection.
- secondaryBasicList
The secondary Datasets of the collection.
Methods
__init__
([primary, secondary])add_secondary
(dset)Append dset to
AnchoredList.secondary
.get_dataset_history_info
()Contruct and return an
macpie.DictLikeTablibDataset
object containing allmacpie.Dataset.history
information.keep_fields
(selected_fields[, ...])Keep specified fields (and drop the rest).
to_excel
(excel_writer[, write_excel_dict])Write
AnchoredList
to an Excel file by callingmacpie.Dataset.to_excel()
onAnchoredList.primary
andAnchoredList.secondary
.to_excel_dict
()Convert the AnchoredList to a dictionary.
Attributes
all_fields
A list of all
macpie.Dataset.all_fields
contained in thisAnchoredList
.key_fields
A list of all
macpie.Dataset.key_fields
contained in thisBasicList
.primary
The primary anchor Dataset of the collection.
secondary
The secondary Datasets of the collection.
sys_fields
A list of all
macpie.Dataset.sys_fields
contained in thisAnchoredList
.tag_anchor
Tag that gets added to the primary Dataset
tag_secondary
Tag that gets added to all the secondary Datasets