0

I have a pandas data frame, as for the following:

| Content  | User           |
| -------- | -------------- |
| x        | A              |
| y        | B              |
| x        | B              |
| z        | C              |
| x        | C              |

I would like to find all users with the same content, as for:

| Content  | User           |
| -------- | -------------- |
| x        | [A, B, C]      |
| y        | [ B ]          |
| z        | [ C ]          |

and then recommend the content not associated yet to the user but already viewed from users with common content:

>     A -> y, z
>     
>     B -> z
>     
>     C -> y

Thanks

0 Answers0