📜  考虑小写删除重复的熊猫 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:15.728000             🧑  作者: Mango

代码示例1
result_df = df.apply(lambda x: x.astype(str).str.lower()).drop_duplicates(subset=['Column1', 'Column2'], keep='first')

print(result_df)
  Column1   Column2 Column3
0   'cat'     'bat'   'xyz'
1   'toy'  'flower'   'abc'