pydpeet.return_or_print_blocks#
- pydpeet.return_or_print_blocks(df_filtered, filtered_IDs, print_blocks=True)[source]#
Split df_filtered into blocks based on unfiltered rows and return a list of blocks. Each block includes all rows from start_id to end_id (inclusive), even if IDs repeat.
- Args:
df_filtered (pd.DataFrame): DataFrame containing ID and Test_Time[s] columns. filtered_IDs (pd.Series | list | set | tuple): IDs to filter on. print_blocks (bool, optional): Whether to print the blocks. Defaults to True.
- Returns:
None | list[dict]: List of blocks, each containing start_id, end_id, start_time, and end_time. If print_blocks is True, returns None.