Spec-Zone.ru › Nushell

polars lit for expression

Creates a literal expression.

Signature

> polars lit {flags} (literal)

Parameters

  • literal: Literal to construct the expression.

Input/output types:

input output
any polars_expression

Examples

Created a literal expression and converts it to a nu object

> polars lit 2 | polars into-nu
╭───────┬────────────╮
│ expr  │ literal    │
│ value │ dyn int: 2 │
╰───────┴────────────╯

Create a literal expression from date

> polars lit 2025-04-13 | polars into-nu
╭──────────────┬──────────────────────────────────────────╮
│              │ ╭───────┬──────────────────────────────╮ │
│ expr         │ │ expr  │ literal                      │ │
│              │ │ value │ dyn int: 1744502400000000000 │ │
│              │ ╰───────┴──────────────────────────────╯ │
│ dtype        │ Datetime('ns')                           │
│ cast_options │ STRICT                                   │
╰──────────────┴──────────────────────────────────────────╯

Create a literal expression from duration

> polars lit 3hr | polars into-nu
╭──────────────┬─────────────────────────────────────╮
│              │ ╭───────┬─────────────────────────╮ │
│ expr         │ │ expr  │ literal                 │ │
│              │ │ value │ dyn int: 10800000000000 │ │
│              │ ╰───────┴─────────────────────────╯ │
│ dtype        │ Duration('ns')                      │
│ cast_options │ STRICT                              │
╰──────────────┴─────────────────────────────────────╯

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

Spec-Zone.ru

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