Create Field
Description
A Field is composed of a name and a data type. Fields are used in Structs-datatypes and Schemas to represent everything of the Series/Column except the raw values.
Usage
pl$Field(name, datatype)
Arguments
name
|
Field name |
datatype
|
DataType |
Value
An object of class “RPolarsRField”
containing its name and
its data type.
Active Bindings
datatype
$datatype
returns the data type
of the Field.
$datatype = <RPolarsDataType>
sets the data type of the Field.
name
$name
returns the name of the
Field.
$name = “new_name”
sets the name
of the Field.
Examples
#> Field {
#> name: "city_names",
#> dtype: String,
#> }
#> DataType: String
#> [1] "city_names"
#> DataType: Categorical(
#> None,
#> Physical,
#> )
#> Field {
#> name: "CityPoPulations",
#> dtype: Categorical(
#> None,
#> Physical,
#> ),
#> }