I have the following dataframe:
id phone email
10352897
10352897 10225967
10352897 [email protected]
10352897 10225967 [email protected]
10225967
10225967 [email protected]
[email protected]
23578910
23578910 38256789
23578910 [email protected]
23578910 38256789 [email protected]
38256789
38256789 [email protected]
[email protected]
65287930 [email protected]
65287930
[email protected]
65287930
70203065
70203065
70203065
[email protected]
[email protected]
[email protected]
Not all the fields are always filled in, but they are related to each other in at least one column.
I would like that when it coincides in at least one of the three columns, the record joins and prioritizes the filled fields over the empty ones, in the end in this example I would expect the following output:
id phone email
10352897 10225967 [email protected]
23578910 38256789 [email protected]
65287930 [email protected]
70203065
[email protected]
How would you go about doing this?