python 去重

List:
listA = ['python','python','言','是','一','门','动','态','语','言']

print sorted(set(listA), key = listA.index)

 

DataFrame:

    gd = gd.query('mbrg > @grouth and nprg > @grouth')[['code','mbrg','nprg']].drop_duplicates('code') 
posted @ 2017-03-26 23:22  疯吻IT  阅读(226)  评论(0编辑  收藏  举报