Is Mexico City called Mexico City or Mexico when in Mexico?

Mexico city its called: Mexico city or DF.

DF means Federal District

I beg to differ somewhat: It's both.

Quite often, Mexicans say just "México" to refer to Mexico City. For clarity or emphasis, they say, "La Ciudad de México," which is "Mexico City" in English.
"D.F." is the abbreviation in Spanish for "Distrito Federal" -- "Federal District" in English. It's the national capital, and it's an entity roughly comparable to the District of Columbia in the U.S. The "Estados Unidos Mexicanos" -- United Mexican States -- comprise 31 states and a Federal District.

Much as New York City or Boston has come to absorb what were once separate villages and towns, so has Mexico City become coterminous with the entire Federal District over the years since its 1824 creation. Unlike New York, where local usage reserves that term for Manhattan, "México" CAN refer to anywhere in the city/federal district.

Ditto for "D.F." But it's said as "el D.F." -- "the D.F." And "THE D.F." is what all the English speakers I know here who also speak Spanish say in English.

Only people from around that area call it "DF" or "Mexico City", the vast majority of Mexicans just call it México. There are even other more common funny names than "Ciudad de México", "Distrito Federal" or "La Capital" (those names are commonly used by area locals).

(Final pedantic point: From 1824 until 1997, its chief executive was a regent named by the Mexican President. Its "jefe de gobierno" -- chief of government/mayor -- since has been elected. Not much different from D.C. that way.)