(Cross-posted on https://stackoverflow.com/questions/...nt-know-how-to)
Please apologize for the title, I don't know how I can otherwise formulate that!
So I have here a dataset from steam which includes
= individual user on steam, and
= another user which is a friend of this. Now I want to calculate how many friends each
has.
Here is a sample from my dataset:
It looks for the first time as if every user has only one friend, but we can see that
also sometimes appears as
so it means he/she has actually 2 friends. For example,
has the friend
but he/she also appears as friend of
so
actually has 2 friends. Which command can I use to caculate such relationships? I don't if it is relevant, but the dataset has over 32 million observations.
Please apologize for the title, I don't know how I can otherwise formulate that!
So I have here a dataset from steam which includes
Code:
steamid
Code:
steam_b
Code:
steamid
Here is a sample from my dataset:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str17(steamid steamid_b) "76561197960265729" "76561197967144365" "76561197960265730" "76561197960265733" "76561197960265730" "76561197960265733" "76561197960265730" "76561197960265733" "76561197960265733" "76561197964770089" "76561197960265733" "76561197964770089" "76561197960265733" "76561197964770089" "76561197960265733" "76561197964770089" "76561197960265733" "76561197964770089" "76561197960265738" "76561198010062752" end
It looks for the first time as if every user has only one friend, but we can see that
Code:
steamid
Code:
steam_b
Code:
76561197960265733
Code:
76561197964770089
Code:
76561197960265730
Code:
76561197960265733
Comment