Is it possible to do the followings using Python Pandas?
I have a csv file like the table A.
TABLE A
------------------------------------------------
Name Email
------------------------------------------------
Hinckley Joel hjoel@mail.com
Hinckley Joel hjoel@mail.com
Hinckley Joel hinkleyjoel@mail.com
Joel Hinckley hinkjoel@mail.com
Siegel Allison sallison@mail.com
Nielsen Tami ntami@mail.com
Nielsen Tami ntami@gmail.com
...
I want to remove the rows with the duplicated name, also I want to add a new column "Secondary Email".
The secondary email will be the first email of the duplicated rows.
The final table I want to make is Table B.
TABLE B
-----------------------------------------------------------
Name Email Secondary Email
-----------------------------------------------------------
Hinckley Joel hjoel@mail.com hinkleyjoel@mail.com
Siegel Allison sallison@mail.com
Nielsen Tami ntami@mail.com
As you can see from Table A and B, I want to consider as a same person even if the first and last name was replaced. (ex : "Hinckley Joel" and "Joel Hinckley")
Also, I want to take the secondary email (ex : hinkleyjoel@mail.com) and add it to the new column.
Thank you in advance.