I should first admit that I really found it difficult to come up with a proper title to the complex issue I am facing.
I have the following data:
configuration_id TARGET_CLASS UniqueIdentifier BranchCoverage Total_Branches Size Length Generations Statements_Executed CoverageTimeline_T1 CoverageTimeline_T2 CoverageTimeline_T3
ar_statement com.browsersoft.aacs.User NA 67559dfd 1 60 46 108 NA 108 0.8158776539 0.8381375035
ar_statement com.browsersoft.aacs.User efe4cbdc 1 60 44 103 240 1087446 0.7525773196 0.7540513682 0.7661337337
ar_statement com.browsersoft.aacs.User NA aac8afa6 1 60 43 104 NA 177 0.765031271 0.8062749834
ar_statement com.browsersoft.aacs.User 8567c4bd 1 60 45 105 388 NA 0.8680720145 0.9386218251 0.9484536082
ar_statement com.browsersoft.aacs.User 94e45912 1 60 43 101 118 NA 0.8767466262 0.9471901622 0.9690721649
As you can see there are NAs in the UniqueIdentifier
column. The NA pushed the values in the same row to the right side; the correct value is in the right column. What I want is to remove the NA and replace it with the next column value like:
configuration_id TARGET_CLASS UniqueIdentifier BranchCoverage Total_Branches Size Length Generations Statements_Executed CoverageTimeline_T1 CoverageTimeline_T2 CoverageTimeline_T3
ar_statement com.browsersoft.aacs.User 67559dfd 1 60 46 108 108 NA 0.8158776539 0.8381375035
ar_statement com.browsersoft.aacs.User efe4cbdc 1 60 44 103 240 1087446 0.7525773196 0.7540513682 0.7661337337
ar_statement com.browsersoft.aacs.User aac8afa6 1 60 43 104 177 NA 0.765031271 0.8062749834
ar_statement com.browsersoft.aacs.User 8567c4bd 1 60 45 105 388 NA 0.8680720145 0.9386218251 0.9484536082
ar_statement com.browsersoft.aacs.User 94e45912 1 60 43 101 118 NA 0.8767466262 0.9471901622 0.9690721649
To make it more clear, for those rows where UniqueIdentifier
is NA, then replace the value of each column with value in the next column (it's like pushing the values back).
I hope my question is clear.
How can I do that?