polars selector datetime
For expression.
Select all datetime columns. Optionally filter by time unit (ns, us, ms) and/or timezone.
warning This command requires a plugin The
polars selector datetimecommand resides in thepolarsplugin. To use this command, you must install and registernu_plugin_polars. See the Plugins chapter in the book for more information.
Command Type
plugin
Signature
> polars selector datetime {flags}
Flags
--time-unit {list<string>}: Filter by time unit(s): ns (nanoseconds), us (microseconds), ms (milliseconds).--time-zone {list<string>}: Filter by timezone(s). Use ”*” to match any set timezone, or “unset” to match columns without a timezone.
Input/output types:
| input | output |
|---|---|
| any | polars_selector |
Examples
Create a selector for all datetime columns
> polars selector datetime
Create a selector for nanosecond or microsecond datetime columns
> polars selector datetime --time-unit [ns us]
Create a selector for nanosecond datetime columns with UTC timezone
> polars selector datetime --time-unit [ns] --time-zone [UTC]
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.