May-13-2022, 03:42 PM
Hi,
I have a dataframe with two columns : an 'ID' column and a column 'V1' with different values between 1 and 3.
I'd like to mark each ID with 1 if value 3 is present for this group and 0 otherwise.
The attachment is more clear. I'd like to obtain the 'Result'.
Thank you by advance !
I have a dataframe with two columns : an 'ID' column and a column 'V1' with different values between 1 and 3.
I'd like to mark each ID with 1 if value 3 is present for this group and 0 otherwise.
The attachment is more clear. I'd like to obtain the 'Result'.
Thank you by advance !