Hello, everyone. I'm trying to generate new columns based on the value of another column. For example, my data has just ID and NUMBER and I want to generate 3 new columns based on ID in which NUM1 contains all the values of ID corresponding to the column NUMBERS including "1", NUM2 including "2" and NUM3 including "3".
Any idea how to generate these new columns?
Thank you.
ID | NUMBER | NUM1 | NUM2 | NUM3 |
123 | 165 | 123 | . | . |
124 | 28 | . | 124 | . |
125 | 34 | . | . | 125 |
126 | 175 | 126 | . | . |
127 | 165 | 127 | . | . |
128 | 344 | . | . | 128 |
129 | 299 | . | 129 | . |
130 | 289 | . | 130 | . |
Thank you.
Comment