The U.S. Department of State says that crime in Mexico varies widely by location with the worst crime reported in the states that border the United States and the south of Mexico, mostly because of drug cartel activity.
In Mexico City, The U.S. Department of State’s Bureau of Diplomatic Security (OSAC) reports that the general crime rate is above the national average. Crime varies widely. Armed robberies, kidnappings, car thefts, credit card fraud and various forms of residential/street crime are daily concerns. The low rate of criminal convictions contributes to the high crime rate. Although there is no pattern of criminals specifically targeting expats or foreign businesses, criminals will target victims based on an appearance of prosperity, vulnerability or a lack of awareness. Thefts of vehicle computers and sound systems are common crimes. Although Mexico employs strict gun-control laws, criminals are usually armed with handguns (or knives).
You can stay updated on travel warnings and safety information at this U.S. Department of State website.