Hi everyone, I'm working with a long list of country names, which are strings. I want to make sure that my form of the names is the same as that used by Wolfram so that I can use CountryData. The trouble is, I can't do a comparison because
gives me a list of names but their Heads are Entity rather than String. Pain in the neck. How can I convert this list to strings so that I can edit my list of names? Any advice would be much appreciated.
Use the function CommonName.
Good stuff, Sean. Thank you for the tip. I obviously need to do my homework on this.
Standardly "Name" is the property of many entities which gives you the string:
Cases[EntityProperties["Country"], "Name", Infinity]
So when this is the case then this works:
c = CountryData["Countries"];
But generally speaking Entity is just a function:
so this always works:
Sorry for my late reply. Thank you for your tip. Works like a charm. I'll have to do some homework on Entities and Objects to learn how I can make the most use of them.