# eval()

<mark style="background-color:yellow;">**Note:**</mark> <mark style="background-color:yellow;">the</mark> <mark style="background-color:yellow;">`eval()`</mark> <mark style="background-color:yellow;">function depends on</mark> [<mark style="background-color:yellow;">scalar functions and operators</mark>](https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/beta-features/scalar-functions-and-operators)<mark style="background-color:yellow;">, which is currently beta functionality, and may change in the future!</mark>

`eval([...col = expression])` runs each `expression` and assigns it to the corresponding `col`.

`expression` supports any composition of [scalar functions and operators](https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/beta-features/scalar-functions-and-operators).

Currently, scalar expressions can express more data types than table values can. Hence, at assignment, scalar expression values are converted back to table values as such:

* numbers, strings, and null values are preserved
* boolean values are converted to the strings `"true"` and `"false"`
* arrays are converted to a string via JSON serialization

<mark style="background-color:yellow;">**Note:**</mark> <mark style="background-color:yellow;">This conversion behavior may change when direct support for these types is added to tables.</mark>

## Returns

A same table as the input, with additional columns corresponding to the `col`s specified.

## Examples

Get a list of HTTP 502s, converting the elapsed time from milliseconds to seconds.

```python
response.status=502
| eval elapsed_s = request.elapsed_ms / 1000
```
