i have a dataframe like this:
data = {'costs': [150, 400, 300, 500, 350], 'month':[1, 2, 2, 1, 1]}
df = pd.DataFrame(data)
i want to use groupby(['month']).sum() but first row not to be cobmined with fourth and fifth rows so the result of costs would be like this
list(df['costs'])= [150, 700, 850]