Spec-Zone.ru › Nushell

polars get-month для dataframe

Получает месяц из даты.

Сигнатура

> polars get-month {flags}

Типы входных и выходных данных:

вход выход
polars_dataframe polars_dataframe
polars_lazyframe polars_lazyframe
polars_expression polars_expression

Примеры

Возвращает месяц из даты

> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC');
    let df = ([$dt $dt] | polars into-df);
    $df | polars get-month
╭───┬───╮
│ # │ 0 │
├───┼───┤
│ 0 │ 8 │
│ 1 │ 8 │
╰───┴───╯

Возвращает месяц из даты в выражении

> let dt = ('2020-08-04T16:39:18+00:00' | into datetime --timezone 'UTC');
    let df = ([$dt $dt] | polars into-df);
    $df | polars select (polars col 0 | polars get-month)
╭───┬───╮
│ # │ 0 │
├───┼───┤
│ 0 │ 8 │
│ 1 │ 8 │
╰───┴───╯

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/polars_get-month.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API