Any country can be dangerous depending upon if you do unsafe things. These would include getting drunk so that you are more likely to be assaulted or have less control of yourself. Another thing that you could do that would be unsafe is to walk in unsafe areas. You should always walk with friends and to well-lit and safe areas.
If you do not know the safe areas of this city, then you should look it up on the internet. With that said, Mexico can be a dangerous country, but it would be best to stick to the tourist areas and stay with friends. It would also be best to remain sober to not only remember the experience but it would be safer too.