Group Abstract Group Abstract

Message Boards Message Boards

1
|
8.7K Views
|
4 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How Can I Convert Entities to Strings?

Posted 12 years ago
POSTED BY: Gregory Lypny
4 Replies
Posted 12 years ago

Good stuff, Sean. Thank you for the tip. I obviously need to do my homework on this.

Gregory

POSTED BY: Gregory Lypny
Posted 12 years ago

Hi Vitaliy,

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.

Gregory

POSTED BY: Gregory Lypny

Standardly "Name" is the property of many entities which gives you the string:

Cases[EntityProperties["Country"], "Name", Infinity]

{"Name"}

So when this is the case then this works:

c = CountryData["Countries"];
EntityValue[c, "Name"]

But generally speaking Entity is just a function:

Entity["Country", "Afghanistan"]

so this always works:

c[[All, 2]]
POSTED BY: Vitaliy Kaurov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard