I have a dataset like this.
I want to replace the value of project within number with the first value of the project column if the number are repeated. Otherwise, we don't need to repeat.
Thank you!
clear
input str70 number str380 project
"F-000073" "Meadowcreek Pavilion"
"F-000073" "000 4502 - Parks Consolidated Construction Fund"
"F-000509" "Environmental Projects"
"F-000509" "000 4502 - Parks Consolidated Construction Fund"
"F-000675" "Design Services for Various Parks"
"F-000675" "000 4035 - Parks & Recreation Dedication Fund"
"F-000703" "Swimming Pool Upgrades"
"F-000703" "000 4502 - Parks Consolidated Construction Fund"
"F-000706" "Busby Park Redevelopment"
"F-000703" "Wright-Bembry Park"
"F-000709" "000 4035 - Parks & Recreation Dedication Fund"
"F-000713" "Metropolitan Multi-Service Center"
"F-000713" "000 4502 - Parks Consolidated Construction Fund"
"D-000180" "Alief MSC,Community Center and Library"
end
I want to replace the value of project within number with the first value of the project column if the number are repeated. Otherwise, we don't need to repeat.
Thank you!
clear
input str70 number str380 project
"F-000073" "Meadowcreek Pavilion"
"F-000073" "000 4502 - Parks Consolidated Construction Fund"
"F-000509" "Environmental Projects"
"F-000509" "000 4502 - Parks Consolidated Construction Fund"
"F-000675" "Design Services for Various Parks"
"F-000675" "000 4035 - Parks & Recreation Dedication Fund"
"F-000703" "Swimming Pool Upgrades"
"F-000703" "000 4502 - Parks Consolidated Construction Fund"
"F-000706" "Busby Park Redevelopment"
"F-000703" "Wright-Bembry Park"
"F-000709" "000 4035 - Parks & Recreation Dedication Fund"
"F-000713" "Metropolitan Multi-Service Center"
"F-000713" "000 4502 - Parks Consolidated Construction Fund"
"D-000180" "Alief MSC,Community Center and Library"
end
Comment