Mexico City is the most populous city in North America. It is the oldest capital city in the Americas and was founded by indigenous people.
Most places accept credit cards but have some cash ready. Small businesses only take cash. I recommend carrying around 600 MXN (30 USD), just in case. And try to have some change in coins and low-denomination bills. Also, remember to pay with your credit card since this is the safest way to pay.
Mexico City is huge, and some places are safer than others. If you ask people in Mexico, they will all have different opinions about where is safe and where is not, but they will all agree that touristic places are safe: Condesa, Polanco, Roma, San Angel, Downtown Coyoacan, Reforma, etc. There are many other places where you can walk without any worries, but be aware of your surroundings and follow your instincts.