Series.Struct (SeriesStructNameSpace)
Namespace: Polars.FSharp
Properties & Indexers
| Property | Type | Description |
|---|---|---|
.[index: int] / .[name: string] / .[names: string[]] | Series | Access the fields of the struct by index. Access the fields of the struct by name. Access the fields of the struct by multiple names. |
Instance Methods
Drop
Drop one or more fields from the struct.
fsharp
member Drop(names: seq<string>, ?strict: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
names | seq<string> | Names of the fields to drop. |
strict | bool (optional) | If True, raise an error if any of the specified fields do not exist in the struct. |
Field
Retrieve a field from the struct by name.
Retrieve a field from the struct by index.
fsharp
member Field([<ParamArray>] names: string[]) : Series
member Field(index: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
names | string[] | - |
index | int | - |
JsonEncode
Convert struct to JSON string.
fsharp
member JsonEncode : unit -> SeriesRenameFields
Rename the fields of the struct.
fsharp
member RenameFields([<ParamArray>] names: string[]) : SeriesParameters
| Name | Type | Description |
|---|---|---|
names | string[] | - |
Unnest
Unnest the struct column into a DataFrame. Each field of the struct becomes a separate column.
fsharp
member Unnest : unit -> DataFrameWithFields
Add or overwrite fields of this struct.This is similar to with_columns on DataFrame.
fsharp
member WithFields([<ParamArray>] fields: Expr[]) : SeriesParameters
| Name | Type | Description |
|---|---|---|
fields | Expr[] | Field(s) to add, specified as positional arguments. |