Pandas group by and sum two columns
You just need to call sum
on a groupby
object:
df.groupby('integer_id').sum()
See the docs for further examples
You just need to call sum
on a groupby
object:
df.groupby('integer_id').sum()
See the docs for further examples