# `IO.ANSI.Table.Spec.Rows`
[🔗](https://github.com/RaymondLoranger/io_ansi_table/blob/main/lib/io/ansi/table/spec/rows.ex#L1)

Derives the rows of a table.
Also transposes rows into columns.

# `derive_and_put`

```elixir
@spec derive_and_put(IO.ANSI.Table.Spec.t(), [Access.container()]) ::
  IO.ANSI.Table.Spec.t()
```

Derives the rows of a table given `spec` and `maps`.

## Examples

    iex> alias IO.ANSI.Table.Spec.Rows
    iex> alias IO.ANSI.Table.Spec
    iex> spec = Spec.new([:c4, :c1, :c2])
    iex> maps = [%{c1: 11, c2: 12, c4: 14}, %{c1: 21, c2: 22, c4: 24}]
    iex> %Spec{rows: rows} = Rows.derive_and_put(spec, maps)
    iex> rows
    [["14", "11", "12"], ["24", "21", "22"]]

# `transpose`

```elixir
@spec transpose([IO.ANSI.Table.Row.t()]) :: [IO.ANSI.Table.Column.t()]
```

Transposes `rows` into columns.

## Examples

    iex> alias IO.ANSI.Table.Spec.Rows
    iex> rows = [
    ...>   ["1", "2", "3"],
    ...>   ["4", "5", "6"]
    ...> ]
    iex> Rows.transpose(rows)
    [["1", "4"], ["2", "5"], ["3", "6"]]

---

*Consult [api-reference.md](api-reference.md) for complete listing*
