Expand description
A column’s declared type: one vocabulary for the type row, a delimited spec’s
[columns], the typing of text columns, and a column retyped in the table.
ColumnType is a type name and, for the temporal ones, a strftime format, read
from and written as the inline table a spec entry uses: { type = "date", format = "%d/%m/%Y" }. ColumnType::expr turns a column into it, lazily and never failing:
a value that does not fit is null. ColumnType::unfit counts those values, for
the note that says so (unfit_notes).
Structs§
- Column
Change - A change to a view’s columns, by name: a type, or a column made from others, as a
spec’s
[columns]entry says it. - Column
Type - A column’s declared type.
- Derived
- A column built from others:
time = { from = ["Date", "Time", "Offset"], as = "datetime" }. - Typed
- A column given a type, and the type it had before: what
unfit_framecounts. - Unfit
- The values a column’s type made null: those that are not of it, and those out of its range.
Enums§
- Change
- Derived
Kind - What a derived column is.
Constants§
- DATETIME_
FORMATS - The datetime formats, as
DATE_FORMATS. - DATE_
FORMATS - The date formats
read.infer_typestries and a retype offers, most common first. - TIME_
FORMATS - The time formats, as
DATE_FORMATS. - TYPE_
NAMES - The type names, as the type row shows them and a spec or a picker takes them.
Functions§
- dtype_
label - The short name of a column’s type, as the type row and the schema pane spell it.
- dtype_
named - The type a name in
TYPE_NAMESstands for. - durations
- Text in Polars’ duration format (
1d,2h30m,-1w2d) as nanoseconds. A value that does not parse is null. - formats_
reading - The formats of a temporal
dtypethat readsample, in the order they are tried. - has_
leading_ zero - Whether
valuestarts with a zero another digit follows, as02134,007and-01do and0,0.5,-0.5and0e3do not: a code or an ID, kept as text rather than read as a number. - preview
valueread asty, as the table would show it:2024-03-04for03/04/2024as a date with%d/%m/%Y.Nonewhen it does not read.- unfit_
counts - The counts in
counted, the one rowunfit_framecollects, fortyped. - unfit_
frame - One pass over
source, the frame before the columns oftypedwere typed, that counts the values each one made null. - unfit_
notes - A note a column, for each column whose type made values null:
LogIdx: 3 values not i64, read as null,RPM: 2 values out of range for u8, read as null.