5

Use the two-argument form of First: listOfKeys = {"Ambientalismo", "Anoressia", "blahblah"}; list3 =First[#, Missing["NotFound"]]&/@ (WikidataSearch /@ listOfKeys) DeleteMissing[list3] Update: Re "just to understand why my attempt are not working" and "if I have a list with {1, "anoressia&...


4

Define findParent as: ClearAll[findParent] findParent = Thread[# -> WikidataData[#, ExternalIdentifier["WikidataID", "P279", <|"Label" -> "SubclassOf"|>]] ] &; edges = Flatten[findParent /@ list3]; Graph[edges, VertexShapeFunction -> (Text[Framed @ Style[#2["Label"] /. ...


2

To understand f[#["apples"], #["oranges"]] &[<|"apples" -> 10, "oranges" -> 12, "pears" -> 4|>] break up what you are doing into its parts. assoc = <|"apples" -> 10, "oranges" -> 12, "pears" -> 4|> (* the argument *) func = assoc |-> f[assoc[&...


2

Use double square brackets to point at the element staying at the nth place, x[[3]] will produce the element staying in the third-place counting from 1 for the beginning of the list. In the example, it is 13. {11,12,13,14}[[1]] will produce 11 and {11,12,13,14}[[4]] equals Last[{11,12,13,14},that is, 14.


1

I add an answer because I need more space. Consider for example Wolfram for Software Developers and more particularly the link Wolfram language for Jupyter. The Wolfram language being passed to Jupyter is inconsistent with In a first approximation, the Wolfram Language = Mathematica + Wolfram|Alpha + Cloud + more. It's compatible with Mathematica, but it's ...


Only top voted, non community-wiki answers of a minimum length are eligible