Friday, May 28, 2021

keep common household information only in the first row of the household

Hi all,

I have data set with household characteristics.
District Village Household_ID Menber_ID Monthly_NonFood_Exp
5 1 1 1 610
5 1 1 2 610
5 1 1 3 610
5 1 1 4 610
7 3 2 1 845
7 3 2 2 845
7 3 2 3 845
7 3 2 4 845
7 3 2 5 845
The monthly food expenditure of the household repeats for all the household members.
I want to keep the monthly food expenditure on the first row only.
Simply, I want the data set to look like the following table.
Can anyone please help me?
District Village Household_ID Menber_ID Monthly_NonFood_Exp
5 1 1 1 610
5 1 1 2 .
5 1 1 3 .
5 1 1 4 .
7 3 2 1 845
7 3 2 2 .
7 3 2 3 .
7 3 2 4 .
7 3 2 5 .

No comments:

Post a Comment