drop duplicates pandas considering lowercase

Solutions on MaxInterview for drop duplicates pandas considering lowercase by the best coders in the world

showing results for - "drop duplicates pandas considering lowercase"
Clovis
15 Jun 2017
1result_df = df.apply(lambda x: x.astype(str).str.lower()).drop_duplicates(subset=['Column1', 'Column2'], keep='first')
2
3print(result_df)
4  Column1   Column2 Column3
50   'cat'     'bat'   'xyz'
61   'toy'  'flower'   'abc'
similar questions