How do I create 2 columns out of Source and place values from Capacity in them thereby eliminating the duplicate Ids. Run the below code:
df = pd.DataFrame({'Id':['a','a','b','b','c','c','d','d','e','e'],
'Source':['Group','Ranking','Ranking','Group','Group','Ranking','Group','Ranking','Group','Ranking'],
'Capacity':['Young Professionals','$1 - $199,989','$1 - $199,989','Midlife Suburbanites','Elite Families','$549,948 - $649,975','Small Town Families','$1 - $199,989',
'Small Town Families','$1 - $199,989']})
Id Group Ranking
a Young Professionals $1 - $199,989
b Midlife Suburbanites $1 - $199,989
c Elite Families $549,948 - $649,975
d Small Town Families $1 - $199,989
e Small Town Families $1 - $199,989