1---2title: "Types"3sidebar_position: 44---56# Types78Each [nushell type](https://www.nushell.sh/book/types_of_data.html)9becomes a cell of a kind a spreadsheet can work with, and goes back to10the same type. A file size is a number of bytes in the Size format, so11`=SUM` adds it and `where size > 1kb` still compares it once it's back12in nushell ([`sheet`](pipelines.md#the-sheet-command) is 012 as a stage13of a pipeline):1415```nu16ls | select name size | sheet | describe17# table<name: string, size: filesize>18```1920This holds wherever NUON carries a table: [pipelines](pipelines.md),21[notebook cells](notebooks.md) and their outputs sent to sheets, `.nuon` files opened, imported or22downloaded, and linked `.nuon` files.2324| Nushell | Cell | Sent back as |25|---|---|---|26| [int, float](https://www.nushell.sh/book/types_of_data.html#integers) | A number | An int when whole, a float otherwise |27| [string](https://www.nushell.sh/book/types_of_data.html#text-strings) | Text, kept as text even when it looks like a number (`"12"`) | A string |28| [bool](https://www.nushell.sh/book/types_of_data.html#booleans) | TRUE or FALSE | A bool |29| [null](https://www.nushell.sh/book/types_of_data.html#nothing-null) | A blank cell | null |30| [filesize](https://www.nushell.sh/book/types_of_data.html#file-sizes) (`1646b`) | The number of bytes, in the [Size format](../sheets/formatting.md#number-formats): `1.6 kB` | A filesize, from any number in the Size format |31| [duration](https://www.nushell.sh/book/types_of_data.html#durations) (`90sec`) | Elapsed time, in the Duration format: `0:01:30`, with milliseconds (`0:00:01.500`) when there are fractions of a second | A duration, from any number in the Duration format |32| [datetime](https://www.nushell.sh/book/types_of_data.html#dates) | A date and time in the local time zone, in the Date time format | A datetime with the local offset, to the microsecond, from any number in a date or date-time format; a time of day alone is a duration since midnight |33| [list](https://www.nushell.sh/book/types_of_data.html#lists), [record](https://www.nushell.sh/book/types_of_data.html#records) | Their NUON text: `[a, b]`, `{k: 1}` | The list or record again, when the text is still exactly NUON |34| [binary](https://www.nushell.sh/book/types_of_data.html#binary-data) | Its NUON text, `0x[DEAD]` | Binary again, as lists and records |3536Since the types are the cells' formats, formatting a column in 01237decides what goes back: numbers given the Size format go back as file38sizes, and a date column formatted as plain numbers goes back as39numbers.4041## Currency and percentages4243Nushell has no type for money or percentages, so `$3.50` goes to44nushell as the number `3.5` and `12%` as `0.12`, which `math sum` and45`where price > 3` work on. The format comes back with the column: when46a [notebook cell](notebooks.md)'s output is sent to a sheet, each of47its columns named as a column of the ranges the cell read48(`$sheet.A1:C9`, `$selection`) takes that column's format again, when49its values are still of the type the format shows. A price column read50as currency and sent back is currency, a date column shows its dates51in its own pattern (`2026-09-29` rather than the Date time format), and52a size column keeps its decimals:5354```nu55$sheet.A1:D9 | where price > 3 | sort-by bought # price is currency again on the sheet56```5758A column named anew (`insert total {|r| $r.price * $r.qty}`) has no59format to take, and shows plain numbers. Outside notebooks, [`012 get --format json`](../reference/json.md#values)60keeps currency and percentages as typed values.6162## Tables, records and single values6364A value that isn't in a table comes in as a table too: a65[record](https://www.nushell.sh/book/types_of_data.html#records) is one66row (`sys host`), and a list of values that aren't records is one67column named `value`. Errors in cells go out as their text68(`"#DIV/0!"`).6970## JSON7172JSON has fewer types, so a table sent as JSON (`--to json`, or a table73that came in as JSON) carries numbers, booleans, text and null as74themselves, file sizes as bytes, durations as nanoseconds and dates as75RFC 3339 text, as nushell's76[`to json`](https://www.nushell.sh/commands/docs/to_json.html) does.77Use NUON to keep the types.7879## What doesn't survive the trip8081- An empty string comes back as null: both are a blank cell.82- A whole float such as `2.0` comes back as the int `2`.83- Text with line breaks comes back on one line.84- Dates past the microsecond lose the rest: a cell's date is a count of85 days, which holds about that much.86- Nested values are text in the sheet, so formulas see their text, not87 their contents. Flatten them in nushell first88 ([`flatten`](https://www.nushell.sh/commands/docs/flatten.html),89 [`select`](https://www.nushell.sh/commands/docs/select.html) with a90 cell path) to work with them as columns.