[Tutor] combinations of all rows and cols from a dataframe
Peter Otten
__peter__ at web.de
Fri Mar 31 07:55:17 EDT 2023
On 31/03/2023 10:06, Roel Schroeven wrote:
> Op 30/03/2023 om 13:41 schreef marc nicole:
>> @Peter what you did is more or less what i was looking for except that i
>> see "duplicate" tuples e.g., ([2], [6, 5]) & ([6, 5], [2]) which are
>> unwanted in the final output
> There where duplicates in your example output too: you had both [[2],
> [6]] and [[6], [2]], and [[2], [5]] and [[5], [2]]. That's probably one
> of the reasons people asked you to state the requirements clearly.
As Roel says. I gave you a possible solution with no duplicates and
another with all duplicates, but your reference solution has some
duplicates.
More information about the Tutor
mailing list