I have dataframe that looks like this:
| Year | Mark | Clip |
|---|---|---|
| 2020 | 19 | AC |
| 2020 | 19 | AC |
| 2022 | 17 | AC |
| 2022 | 18 | No |
| 2021 | UM | AC |
| 2021 | UM | AC |
| 2020 | 19T | No |
| 2022 | 19D | AC |
| 2020 | UM | AC |
The Mark column is a character column because some marks contain characters. I want to count the sum of the observations of a mark by year. Output should look like:
| Year | Mark | Count |
|---|---|---|
| 2020 | 19 | 2 |
| 2020 | 19T | 1 |
| 2020 | UM | 1 |
| 2021 | UM | 2 |
| 2022 | 17 | 1 |
| 2022 | 18 | 1 |
| 2022 | 19D | 1 |