Home Forums Main Forums SAS Forum Fill Out Missing Records

  • Fill Out Missing Records

     Wong updated 3 months, 1 week ago 1 Member · 1 Post
  • Wong

    Member
    June 12, 2021 at 11:22 am

    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.

Original Post
0 of 0 posts June 2018
Now