I have list of uniques from column ACCOUNTMANAGER and I need to pick sorted duplicates to separate file.
Is it possible to use duplicates or something similar to pick identical column values and save them to separate lists?
Let's say ACCOUNTMANAGER contains list of names ['Jack', 'Jack', 'Dane', 'Jessica', 'Jessica', 'Jessica' ]
. I would like to have jack list of all Jacks
, Dane
list oven if one value and list of Jessicas
. How can I do this using uniques and duplicates? Here is my code:
uniques = df['ACCOUNTMANAGER'].unique()
print(uniques)