def get_monthly_sums(transactions_df):
    """Calculate the total charged for purchases each month."""
    months = transactions_df.transaction_date.dt.to_period('M')
    monthly_sums = transactions_df.groupby(months).sum()
    return monthly_sums
