I have 8 columns, col_1 to col_5 can have either a valid value or -1 indicating any value and I have lists which contain values that these columns can take. There are 3 other columns col_6 to col_8 which can take any valid value which is defined in some list. I want to create all combinations of col_1 to col_5 having -1 and fill remaining with random valid values. col_6 to col_8 can take any random value from the list.
Example with 2 columns not having -1 and 2 columns having -1:
Example with 2 columns not having -1 and 3 columns having -1:
Valid means any value that is sampled from the list of values.
For my case I want to have rows having -1 for the below columns then randomly sample some values for the other columns
[(),
('col_1',),
('col_2',),
('col_3',),
('col_4',),
('col_5',),
('col_1', 'col_2'),
('col_1', 'col_3'),
('col_1', 'col_4'),
('col_1', 'col_5'),
('col_2', 'col_3'),
('col_2', 'col_4'),
('col_2', 'col_5'),
('col_3', 'col_4'),
('col_3', 'col_5'),
('col_4', 'col_5'),
('col_1', 'col_2', 'col_3'),
('col_1', 'col_2', 'col_4'),
('col_1', 'col_2', 'col_5'),
('col_1', 'col_3', 'col_4'),
('col_1', 'col_3', 'col_5'),
('col_1', 'col_4', 'col_5'),
('col_2', 'col_3', 'col_4'),
('col_2', 'col_3', 'col_5'),
('col_2', 'col_4', 'col_5'),
('col_3', 'col_4', 'col_5'),
('col_1', 'col_2', 'col_3', 'col_4'),
('col_1', 'col_2', 'col_3', 'col_5'),
('col_1', 'col_2', 'col_4', 'col_5'),
('col_1', 'col_3', 'col_4', 'col_5'),
('col_2', 'col_3', 'col_4', 'col_5'),
('col_1', 'col_2', 'col_3', 'col_4', 'col_5')]

