The question has long been spinning in my head until the need arose. The following data is available:
It is necessary that instead of the observation number, he wrote the name of the city. In all embedded data, these names already exist and this problem does not arise. Is it possible to indicate that city is not just one of the variables, but the identifier (name) of each observation?

dput()function to generate sample data. Example:dput(head(mtcars)). - Artem Klevtsov