The documentation page for EntityClass
states that
Property values in implicitly defined entity classes may make use of Quantity (and intervals of Quantity) for dimensional values, DateObject for dates, TakeLargest and TakeSmallest for ordinal selections, and ContainsAll, ContainsExactly, ContainsAny, ContainsOnly, ContainsNone for entities. Lists of entities are interpreted as ContainsAll, while a single entity is interpreted as ContainsAny[{entity}].
If I run the following command with TakeLargest
, I get the output I intended.
EntityValue[EntityClass["TropicalStorm", {"WindSpeed" -> TakeLargest[10]}], "WindSpeed", "EntityAssociation"]
However, if I execute the following with ContainsAny
EntityValue[EntityClass["TropicalStorm", {"Basin" -> ContainsAny[{"North Atlantic Ocean", "North Indian Ocean"}], "WindSpeed" -> TakeLargest[10]}], "WindSpeed", "EntityAssociation"]
the output is
Missing["QueryValueIncompatibleWithProperty", {"TropicalStorm", "Basin", ContainsAny[{"North Atlantic Ocean", "North Indian Ocean"}]}]
What is the proper syntax for using ContainsAny
in this context?
I apologize if this is a trivial question... I am new to the language.
Thanks!
Comments
Post a Comment