pydpeet.split_df_by_blocks#
- pydpeet.split_df_by_blocks(df_filtered, blocks)[source]#
Split df_filtered into multiple DataFrames per block.
Each block includes all rows from start_id to end_id (inclusive), even if IDs repeat.
- Args:
df_filtered (pd.DataFrame): DataFrame to split. blocks (list[dict]): List of dictionaries where each dictionary contains the keys:
start_id (int): ID of the start of the block.
end_id (int): ID of the end of the block.
- Returns:
list[pd.DataFrame]: List of DataFrames per block.