0
data = [{"a": "abc", "b": 10, "c": 7},
        {"a": "c", "b": 9, "c": 8},
        {"a": "abc", "b": 10, "c": 5},
        {"a": "c", "b": 2, "c": 5},
        {"a": "k", "b": 10, "c": 5}]

I have date like that how can I delete duplicated dict in property "a". After delete them, this data will be like that: Note: Keep the first duplicated one, and delete all the rest.

data = [{"a": "abc", "b": 10, "c": 7},
        {"a": "c", "b": 9, "c": 8},
        {"a": "k", "b": 10, "c": 5}]

Thank you guy so much for helping me!

DFX Nguyễn
  • 139
  • 10

0 Answers0