728x90
자주쓰는데 계속 찾기 귀찮아서 씀
dict 특정 key 중복
list({v['id']:v for v in data}.values())
https://sanghaklee.tistory.com/60
[Python] 리스트 딕셔너리 중복 제거
python how to remove duplicate dict in list https://stackoverflow.com/questions/11092511/python-list-of-unique-dictionaries dict 전체 중복 # 순서가 보장되지 않음 list(map(dict, set(tuple(sorted(d.items())) for d in data))) # 순서가 보장
sanghaklee.tistory.com
728x90
'파이썬' 카테고리의 다른 글
pyside, pyqt QGraphicsDropShadowEffect 로 그림자 효과줄 때 (0) | 2023.08.08 |
---|---|
파이썬 셀레니움 크롬드라이버 ChromeDriverManager 버전 오류 feat.230818 수정 (3) | 2023.07.27 |
파이썬 logging 에서 setLevel 이 not work 할 때 (0) | 2023.06.22 |
Pyqt Pyside 에서 show, hide 인지 확인하는법 (0) | 2023.06.14 |
pyqt label 에 a태그 클릭 시 링크 오픈 안될 경우 (0) | 2023.06.01 |