clean_results.remove_entries_based_on_indices
- clean_results.remove_entries_based_on_indices(data, nan_indices, exceptions=[])[source]
Remove entries at specified indices from nested data structures.
This helper function recursively traverses dictionaries and lists, removing entries at specified indices while preserving structure and handling exceptions.
- Parameters:
- Returns:
If input is a list, returns filtered list If input is a dict, modifies in place and returns None
- Return type:
Notes
The function handles three cases: 1. Dictionaries: Recursively process each value 2. Lists: Filter out specified indices 3. Exception keys: Skip processing entirely