Mexico has some areas that are dangerous.
I have been visiting Mexico City for 18 years, and not staying luxury hotels. I have never experienced, or seen any kind of violence.
When I lived in Scarborough I heard gunshots at night many times.
I'd feel safer in Mexico City than central Scarborough.