I need to remove the duplicate dates from the dataframe and add the values corresponding to those dates.
I found an answer in the NA stack that is close to the one I need, but I could not shape it for my need:
df.groupby('data', group_keys=False).apply(lambda x: x.loc[x.valor.idxmax()])
But instead of grouping by date and keeping the value higher, I need to keep the sum of the values, not just the larger value.