Hi all, I've been tasked to clean a dataset and prepare it for SPSS which doesn't handle blank rows well. The dataset looks something like this:
Basically, there are people visiting each with their own ID and each row is a visit. I have to copy the DOB, sex, and calculate age at time of visit for each person. So something like the image below which I've been doing manually. There are also random gaps throughout because of other data.
However, the task is very repetitive, especially with so much data. I'm sure there's a faster way to do it but I'm not sure how. I tried searching online but I haven't had much luck, probably because I don't know how to describe the issue.
I would appreciate any tips or what I should be searching to find possible solutions. Thanks!
Basically, there are people visiting each with their own ID and each row is a visit. I have to copy the DOB, sex, and calculate age at time of visit for each person. So something like the image below which I've been doing manually. There are also random gaps throughout because of other data.
However, the task is very repetitive, especially with so much data. I'm sure there's a faster way to do it but I'm not sure how. I tried searching online but I haven't had much luck, probably because I don't know how to describe the issue.
I would appreciate any tips or what I should be searching to find possible solutions. Thanks!