Home › Forums › Main Forums › SAS Forum › Fill Out Missing Records
-
Got an interesting ask today. There’s data like below. Each patient should have 3 visit records but there are some missing observations.
Patient Visit Duration
1 1 60
1 2 55
1 3 21
2 2 44
2 3 15
3 2 55
Can you fill out the data which will be like the following?
Patient Visit Duration
1 1 60
1 2 55
1 3 21
2 1 .
2 2 44
2 3 15
3 1 .
3 2 55
3 3 .
It is very simple with SQL cross join.
How about SAS and Python? Can you do it?
Log in to reply.