I have a sample dataframe of company A's electronic consumption shown below
| year-month | company | GWh |
|---|---|---|
| 2017-01 | A | 100 |
| 2018-02 | A | 110 |
| 2019-01 | A | 90 |
| 2019-02 | A | 105 |
| 2020-01 | A | 117 |
| 2020-02 | A | 120 |
i would like to remove data of year 2020 and split the remaining dataframe into two sets:
- Train dataset contains records before year 2019
- Test dataset contains only 2019 records