pymovements.Events.split#
- Events.split(by: Sequence[str] | None = None) list[Events] [source]#
Split the Events into multiple frames based on specified column(s).
- Parameters:
by (Sequence[str] | None) – Column name(s) to split the Events by. If a single string is provided, it will be used as a single column name. If a list is provided, the Events will be split by unique combinations of values in all specified columns. If None, uses trial_columns. (default: None)
- Returns:
A list of new Events instances, each containing a partition of the original data with all metadata and configurations preserved.
- Return type:
list[Events]