0

Let's say I have the Python pandas dataframe below, I want to combine the amount paid column based on employee ID.

[dataframe]

1

eshirvana
  • 23,227
  • 3
  • 22
  • 38
jones0207
  • 1
  • 2

1 Answers1

-1

Well try:

dataframe.groupby('EMPLOYEE_ID')['AMOUNT_PAID'].sum()
eshirvana
  • 23,227
  • 3
  • 22
  • 38
Airdjan
  • 1
  • 1
  • [A code-only answer is not high quality](//meta.stackoverflow.com/questions/392712/explaining-entirely-code-based-answers). While this code may be useful, you can improve it by saying why it works, how it works, when it should be used, and what its limitations are. Please [edit] your answer to include explanation and link to relevant documentation. – Stephen Ostermiller Jan 04 '23 at 01:47