Difference between revisions of "Category talk:Tabular data/doc"
blackwiki>Mxn m (Mxn moved page Module:Sandbox/Mxn/Tabular data/doc to Module:Tabular data/doc: Ready for action) |
blackwiki>Mxn |
||
| Line 9: | Line 9: | ||
This function is reminiscent of <code>LOOKUP()</code> macros in popular spreadsheet applications, except that the search key must match exactly. (On the other hand, this means the table does not need to be sorted.) | This function is reminiscent of <code>LOOKUP()</code> macros in popular spreadsheet applications, except that the search key must match exactly. (On the other hand, this means the table does not need to be sorted.) | ||
| − | Usage: {{mlx|{{PAGENAME}}|''lookup''|''Data table page name.tab''|''Search key''|''Search column name''|''Output column name''}} | + | Usage: {{mlx|{{PAGENAME}}|''lookup''|''Data table page name.tab''|search_value=''Search key''|search_column=''Search column name''|output_column=''Output column name''}} |
| − | Example: | + | Example using [[c:COVID-19 Cases in Santa Clara County, California.tab]]: |
| − | {{#invoke:Demo|module|demo_module={{PAGENAME}}|demo_module_func=lookup|COVID-19 Cases in Santa Clara County, California.tab|2020-03-16|date|totalConfirmedCases}} | + | {{#invoke:Demo|module|demo_module={{PAGENAME}}|demo_module_func=lookup|COVID-19 Cases in Santa Clara County, California.tab|search_value=2020-03-16|search_column=date|output_column=totalConfirmedCases}} |
== <code>wikitable</code> == | == <code>wikitable</code> == | ||
Revision as of 00:07, 10 May 2020
Error: {{Module rating}} must be placed in the Module namespace.
This module displays the contents of a tabular data page on Wikimedia Commons as a (rather plain) table.
lookup
Returns the value of the cell in the given output column of the row matching the search key and column.
This function is reminiscent of LOOKUP() macros in popular spreadsheet applications, except that the search key must match exactly. (On the other hand, this means the table does not need to be sorted.)
Usage: {{#invoke:Tabular data/doc|lookup|Data table page name.tab}}
Example using c:COVID-19 Cases in Santa Clara County, California.tab:
Lua error in package.lua at line 80: module 'Module:Tabular data/doc' not found.
wikitable
Returns the entire data table as a (rather plain) table.
Usage: {{#invoke:Tabular data/doc|wikitable|Data table page name.tab}}
Example
|
|---|
|
Lua error in package.lua at line 80: module 'Module:Tabular data/doc' not found. |