I have a data frame "test", as the following:
ID city quality year 1 NY special 2020 2 NY special 2020 3 NY special 2020 4 NY