Skip to main content

Posts

Showing posts with the label Replace

Replace values based on ID's for determinate columns

I have this situation: ID n post date el a b c d 100_left 4 50 10/11/2020 y 190 5.41 4 300 100_right 4 50 10/11/2020 n 5.4 5 200 101_left 4 50 10/11/2020 y 180 5.49 6 360 101_right 4 50 10/11/2020 n 5.48 6 180 102_left 4 50 10/11/2020 y 190 5.5 3 300 102_right 4 50 10/11/2020 n 5.46 5 200 103_left 4 50 10/11/2020 y 190 5.39 3 170 103_right 4 50 10/11/2020 n 5.44 3 360 I would like to use the same values of n_left for n_right ( ID ), but just for columns from a to d . Like this: ID n post date el a b c d 100_left 4 50 10/11/2020 y 190 5.41 4 300 100_right 4 50 10/11/2020 n 190 5.41 4 300 101_left 4 50 10/11/2020 y 180 5.49 6 360 101_right 4 50 10/11/2020 n 180 5.49 6 360 102_left 4 50 10/11/2020 y 190 5.5 3 300 102_right 4 50 10/11/2020 n 190 5.5 3 300 103_left 4 50 10/11...