I have the following csv
id;price;editor k1;10,00;ed1 k1;8,00;ed2 k3;10,00;ed1 k3;11,00;ed2 k2;10,50;ed1 k1;9,50;ed3
If I do the following
drop_duplicate + sort_values
drop_duplicate
sort_values
#df['price'] = pd.to_numeric(df['price'].str.replace(",", ".")) df.sort_values('price').drop_duplicates(['id']) Out[423]: id price editor 1 k1 8.0 ed2 2 k3 10.0 ed1 4 k2 10.5 ed1