this is my CODE
import pandas as pd
data1 = {'A': [1, 1, 2, 3, 4, 4, 2, 1], 'B': [2, 2, 3, 4, 4, 4, 1, 2]}
df1 = pd.DataFrame(data1)
df1['OUTPUT'] = df1.duplicated(subset=['A', 'B'], keep=False).map({True: 'OK', False: 'NG'})
print(df1)
and the output is this,but is not i want
i want the output is
update: Sorry, this was my mistake. The values in A and B are strings, not numbers.