Dear all,
I am cleaning a raw dataset like this
In principle, for each hhid, the code appeared in code24h should be in code7day as well. For example, I must add 115 into code7day for hhid No2. Right now, I am doing it manually but it is too time-consuming and not transparent.
Does anyone have any idea how to solve this?
Thank you so much.
Lanna Ng
I am cleaning a raw dataset like this
hhid | code24h | code7day |
1 | 145 | 238 |
1 | 238 | . |
1 | 396 | 145 |
1 | 396 | |
1 | 001 | |
2 | 115 | 204 |
2 | 452 | |
2 | 375 | |
.... | ...... |
Does anyone have any idea how to solve this?
Thank you so much.
Lanna Ng
Comment