# table()

`table(col [, ...cols])` removes all columns except the ones specified.

## Returns

A table with the same number of rows, but with only the columns named in `cols`. If a row does not have a value for a column named in `cols`, its value for that column is `null` instead.

## Examples

<pre class="language-python"><code class="lang-python"><strong># Return only the requestId field and userAgent fields,
</strong><strong># out of log events that have the former
</strong><strong>requestId:* | table requestId, userAgent
</strong></code></pre>
