Skip to content

Series.Struct (SeriesStructNameSpace) ​

Namespace: Polars.FSharp

Properties & Indexers ​

PropertyTypeDescription
.[index: int] / .[name: string] / .[names: string[]]SeriesAccess 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) : Series

Parameters

NameTypeDescription
namesseq<string>Names of the fields to drop.
strictbool (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) : Series

Parameters

NameTypeDescription
namesstring[]-
indexint-

JsonEncode ​

Convert struct to JSON string.

fsharp
member JsonEncode : unit -> Series

RenameFields ​

Rename the fields of the struct.

fsharp
member RenameFields([<ParamArray>] names: string[]) : Series

Parameters

NameTypeDescription
namesstring[]-

Unnest ​

Unnest the struct column into a DataFrame. Each field of the struct becomes a separate column.

fsharp
member Unnest : unit -> DataFrame

WithFields ​

Add or overwrite fields of this struct.This is similar to with_columns on DataFrame.

fsharp
member WithFields([<ParamArray>] fields: Expr[]) : Series

Parameters

NameTypeDescription
fieldsExpr[]Field(s) to add, specified as positional arguments.

Released under the MIT License. Powered by the Polars Rust core & Apache Arrow.