Suppose the data is as follows:
id, d1
A, 1
B, 2
A, 3
C, 4
D, 5
E, 6
If A is duplicated in id because A is duplicated in id as follows, I would like to compare the value of d1 column and delete it, leaving only A with a larger value.
id, d1
A, 3
B, 2
C, 4
D, 5
E, 6
python
I think it would be good to use dictionary.
https://wikidocs.net/16
Anyone can be distinguished by "name" = "Hong Gil-dong", "birthday" = "month and date". Python cleverly has a data type that can represent this correspondence. Most languages used these days also have a data type that represents this correspondence, which is called an Associative array or Hash.
© 2025 OneMinuteCode. All rights reserved.