Hi I have a dataframe with a date column and some numeric columns
this is the data
year_month total_visits search_brand_co~ search_non_bran~ facebook_cost display_cost total_organic_s~
<date> <int> <dbl> <dbl> <dbl> <dbl> <int>
1 2020-11-01 91655 30314. 60676. 14548. 4555. 829852
2 2020-12-01 98227 327. 2027. 0 6895. 1047370
3 2021-01-01 91352 0 0 193. 7009. 1284317
4 2021-02-01 77060 15058. 18690. 6728. 6294. 668924
5 2021-03-01 96749 32883. 87256. 0 5587. 418764
6 2021-04-01 84738 29919. 71820. 0 2655. 297460
what I need is group by that will sum the columns where the date column "year_month" is smaller or equal than "2021-01-01" and the other where "year_month" is greater or equal than "2021-02-01"
the final dataframe should only have 2 rows with the same number of columns
Thanks for the help