I have a database of products and I have to validate if the product ID repeats in a column and also validate if it's 'True' or 'False' in another column. Then set all to 'True' if at least one of the duplicated rows are 'True'.
I found a way in this link: Create rule for sets of duplicates in a Pandas Dataframe using the second answer, but it's spending too much time doing the process in my database, something like 8min.
Does someone know how to do that in a faster way?
Example:
ID Active
01 False
01 False
01 True
02 False
02 False
03 True
03 False
03 False
And it should be like this in the end:
ID Active
01 True
01 True
01 True
02 False
02 False
03 True
03 True
03 True