0

I have this data-frame and changes that i want with the data-frame's series are mentioned within the brackets :

date(first case)    project_name(use distinct name)   billed_amount(apply sum)
16-aug                     project-1                           500
16-aug                     project-1                           100
17-aug                     project-2                           1000
17-aug                     project-2                           100

I want new Data-frame to be like below

date    project_name   billed_amount
16-aug    project-1     600
17-aug    project-2     1100

Is this Possible with Pandas??

R.jan
  • 153
  • 1
  • 7
  • 1
    Does this answer your question? [Pandas group-by and sum](https://stackoverflow.com/questions/39922986/pandas-group-by-and-sum) – sushanth Aug 25 '20 at 16:46

1 Answers1

-1

Group by date and project_name, then do a sum over billed_amount

df.groupby(['date','project_name'])['billed_amount'].sum()
NiteshK
  • 101
  • 3