pandas去重

import pandas as pd
 
data = pd.DataFrame([[1, 2],
                    [1, 2],
                    [3, 2],
                    [1, 3],
                    [1, 2]])
# 去重
data_new = data.drop_duplicates()
print(data_new)
 
   0  1
0  1  2
2  3  2
3  1  3

 

posted @ 2019-09-12 01:57  Jumpkin1122  阅读(244)  评论(0编辑  收藏  举报