slitflow.setreqs module
This module includes functions used in the set_reqs method of the Data class. The required data must be sorted to align the correspondence between the data.
- make_index_list(reqs)[source]
Make index list from reqs. Initial data: [“_file”] Loaded data: [“_file”, “_split”, “_keep”]
- make_splits_list(reqs, load_splits=None, data_splits=None)[source]
Generate a list of splits specifications for each request.
- validate_splits(splits_list)[source]
Validate the list of splits to ensure they meet specific criteria.
- add_splits(index_list, splits_list)[source]
Add split columns to a DataFrame based on the provided split values.
- get_index_columns(index_list, splits_list)[source]
Extract index columns based on data split values.
- validate_index_columns(index_data_col_list, index_col_max_list, splits_list)[source]
Validate the consistency of index columns based on the provided lists.
- filter_and_merge_index_data(index_list, splits_list, index_col_max, save_split=None)[source]
Filter and merge index based on the provided lists of index and splits.
- add_mrg_id(merged_df, index_list, index_data_col_list)[source]
Add a ‘_mrg_id’ column to each DataFrame in index_list.
- make_index_dest_setreq(index_list)[source]
Make a list of index DataFrames with ‘_dest’ column added.
- make_load_index(merged_index)[source]
Extract columns containing ‘_load’ and compute ‘_cycle’ and ‘_dest’