I have the following df, for the sake of simplicity, not all rows are shown. The rows are different people how display, which product they would choose.
Product1 Product2 Product3 Product4 Product5 Product6 Product7 Product8
0 1 0 0 1 0 1 0 0
1 0 1 0 0 0 0 0 1
2 1 0 1 1 1 1 0 0
3 1 0 1 0 1 0 1 0
Right now I do work with the following made up df:
df = pd.DataFrame(np.random.randint(2, size=(566,8)))
At the end I would like to know, how many people choose which combination. I came across this approach create all possible combinations. But that did not clear things up for me.
How would you count all the rows that have the same entries by the columns and show at which columns they have an entry ? could someone guide me into the right direction ?