In order to accurately input location data into a machine learning model it really depends on what your goal is and what type of algorithm you are working with. If you are working with a strictly numerical algorithm and your data seems to be spread far apart, it might be easier to convert your country-state-city location to a longitude, latitude feature where the exact value is the centroid location of the given city. This kaggle post has a good writeup of how to run build features for geo-spatial data.
However, if you have only a small number of different locations per identifier (country, city, state) you could just represent them as seperate location classes and subclasses like you would for machine learning detection model. You could think "vehicle" -> "bike" -> "road-bike" similarly to "country" -> "state" -> "city". In this case, you would want to look at hierachical methods for machine learning and see some ways they represent their data. Although I would say this method is more frowned upon for larger datasets, for smaller datasets it might be a better option.