I have a data in this format below. I want to generate another column (X) that gave me the value of the first occurrence of column A. For example, in new column X, it should give me the value of 15 for ID 1 and 32 for ID 2 and 5 for ID 3. How can I get that?
ID | A| Visit
1 . 1
1 15 2
1 14 3
1 . 4
1 18 5
1 . 6
2 . 1
2 . 2
2 32 3
2 . 4
2 23 5
3 . 1
3 5 2


______________________
I want sth like this
ID | A| Visit | X
1 . 1 15
1 15 2 15
1 14 3 15
1 . 4 15
1 18 5 15
1 . 6 15
2 . 1 32
2 . 2 32
2 32 3 32
2 . 4 32
2 23 5 32
3 . 1 5
3 5 2 5