Search a list of records: Difference between revisions
Content added Content deleted
Drkameleon (talk | contribs) |
|||
Line 1,871: | Line 1,871: | ||
</pre> |
</pre> |
||
=={{header|Mathematica}}== |
=={{header|Mathematica}}/{{header|Wolfram Language}}== |
||
<lang Mathematica> |
<lang Mathematica>data = Dataset[{ |
||
data = Dataset[{ |
|||
<|"name" -> "Lagos", "population" -> 21.|>, |
<|"name" -> "Lagos", "population" -> 21.|>, |
||
<|"name" -> "Cairo", "population" -> 15.2|>, |
<|"name" -> "Cairo", "population" -> 15.2|>, |
||
Line 1,885: | Line 1,884: | ||
<|"name" -> "Casablanca", "population" -> 3.98|> |
<|"name" -> "Casablanca", "population" -> 3.98|> |
||
}] |
}] |
||
data[Position["Dar Es Salaam"], "name"][1, 1] - 1 |
data[Position["Dar Es Salaam"], "name"][1, 1] - 1 |
||
data[Select[#population < 5 &]][1, "name"] |
data[Select[#population < 5 &]][1, "name"] |
||
data[Select[StringMatchQ[#name, "A*"] &]][1, "population"]</lang> |
data[Select[StringMatchQ[#name, "A*"] &]][1, "population"]</lang> |
||
=={{header|Nim}}== |
=={{header|Nim}}== |