I have one dataframe, containing email addresses and the survey the participant with the email address participated in. There were two surveys in total. My dataframe looks like:
emailadress survey
me@me.com 1
me@me.com 2
second@me.com 1
third@me.com 1
third@me.com 2
What i want is:
emailadress survey1 survey2
me@me.com 1 1
second@me.com 1 0
third@me.com 1 1
I tried to make a third dataframe with only unique e-mailaddressess, and find a way to match it with the original dataframe to fill a second and third column. However, there should be a more easy way to do this.
Can anyone help me find the solution?
Thanks in advance!