mutual-friendship

Find the number of mutual friends in Python

Find the number of mutual friends in Python Question: I have a dataframe of users and their friends that looks like: user_id | friend_id 1 3 1 4 2 3 2 5 3 4 I want to write a function in python to compute the number of mutual friends for each pair: user_id | friend_id …

Total answers: 2