You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In targets/synthesis, when a count column is passed, the adding or removing rows is done in two functions: _add_rows_by_count or _remove_rows_by_count.
Inside these functions, there is a case that is not contemplated. From the df, after applying the corresponding filters, only the rows that have a value in the count column less or equal than the amount (to add or remove) are saved into the sort_count array which is then used to pick to_add or to_remove indexes. BUT, the unforeseen case is when the sort_count array is empty, meaning that all of the available rows in the filtered df have count values bigger than the amount value.
In the case of adding rows, an error is raised in line 213 https://github.com/UDST/spandex/blob/master/spandex/targets/synthesis.py#L213
when trying to pop out an index from to_add when this is empty.
In the case of removing, an error will not raise, but the process will iterate over the empty sort_count and the function will end up returning the same df.
The text was updated successfully, but these errors were encountered:
In targets/synthesis, when a count column is passed, the adding or removing rows is done in two functions:
_add_rows_by_count
or_remove_rows_by_count
.Inside these functions, there is a case that is not contemplated. From the df, after applying the corresponding filters, only the rows that have a value in the count column less or equal than the amount (to add or remove) are saved into the
sort_count
array which is then used to pick to_add or to_remove indexes. BUT, the unforeseen case is when thesort_count
array is empty, meaning that all of the available rows in the filtered df have count values bigger than the amount value.In the case of adding rows, an error is raised in line 213
https://github.com/UDST/spandex/blob/master/spandex/targets/synthesis.py#L213
when trying to pop out an index from
to_add
when this is empty.In the case of removing, an error will not raise, but the process will iterate over the empty
sort_count
and the function will end up returning the same df.The text was updated successfully, but these errors were encountered: