pynapple.core.ts_group.TsGroup.merge_group#
- static TsGroup.merge_group(*tsgroups, reset_index=False, reset_time_support=False, ignore_metadata=False)[source]#
Merge multiple TsGroup objects into a single TsGroup object.
- Parameters:
*tsgroups (TsGroup) – The TsGroup objects to merge
reset_index (bool, optional) – If True, the keys will be reset to range(len(data)) If False, the keys of the TsGroup objects should be non-overlapping and will be preserved
reset_time_support (bool, optional) – If True, the merged TsGroup will merge time supports from all the Ts/Tsd objects in data If False, the time support of the TsGroup objects should be the same and will be preserved
ignore_metadata (bool, optional) – If True, the merged TsGroup will not have any metadata columns other than ‘rate’ If False, all metadata columns should be the same and all metadata will be concatenated
- Returns:
A TsGroup of merged objects
- Return type:
- Raises:
TypeError – If the input objects are not TsGroup objects
ValueError – If ignore_metadata=False but metadata columns are not the same If reset_index=False but keys overlap If reset_time_support=False but time supports are not the same