I have df1 with length 100 looks like
PID
123
234
T345
P456
567
and I have another df2 with length 1000 looks like same
PID
123
234
567
T678
P768
....
I need to create new column in df1
if it matches PID
with df2
status as "1"
or "0"
Expected output :
PID V1
123 1
234 1
T345 0
P456 0
567 1
I tried ifelse condition but error occured due to uneven length .
Thanks in advance