I have the below panda dataframe
Now I want to sum the count for [user 1][user 2] and [user 2][user 1]. For example, the count value for [user 1 = 1][user 2 = 92] is count = 1 and [user 1 = 92][user 2 = 1] is count = 2, so I want the final output as user 1 = 1, user 2 = 92 and count = 3. Also, there might not be [user 2][user 1] for every [user 1][user 2]. For example, for [user 1 = 29][user 2 = 56] count value is 3 but there is no [user 1 = 56][user 2 = 29], so the final output would be user 1 = 29, user 2 = 56 and count = 3.
So final output should look like this
Can someone please guide me how to do this?