Jun 20, 2019 · Removing duplicates based on specific columns . In this case whichever columns we shall mention in column array, those columns will act as key columns,and accordingly duplicates will be removed.Here we have considered column 1 and 2 as key column.So any rows which repeat values of column 1 and 2 ,will be considered as duplicate, and they will be deleted.