TzLocalize
Base classes
| Name |
Children |
Inherits |
SeriesOp datacook.engine.ops.series A `ColumnOp` that is one call per column, declared like `CallOp`. |
|
|
⋔ Inheritance diagram
graph TD
4105636325["dates.TzLocalize"]
2451904138["series.SeriesOp"]
124287307["series.ColumnOp"]
1539482213["base.Op"]
2751680898["builtins.object"]
2451904138 --> 4105636325
124287307 --> 2451904138
1539482213 --> 124287307
2751680898 --> 1539482213
🛈 DocStrings
Bases: SeriesOp
Source code in src/datacook/engine/ops/dates.py
| class TzLocalize(series.SeriesOp):
id = "tz_localize"
title = _("Set time zone")
description = _(
"Declare the time zone of date / time values without one (or remove it: empty)."
)
category = categories.DATETIME
icon = "mdi.map-clock"
accessor = "dt"
method = "tz_localize"
positional = ("tz",)
class Params(series.ColumnParams):
tz: str | None = Field(title=N_("Time zone"), examples=["Europe/Berlin", "UTC"])
ambiguous: Literal["raise", "NaT"] = Field(
"raise",
title=N_("Ambiguous times"),
description=N_("Times that occur twice when daylight saving time ends."),
)
nonexistent: Literal["raise", "NaT", "shift_forward", "shift_backward"] = Field(
"raise",
title=N_("Nonexistent times"),
description=N_("Times skipped when daylight saving time starts."),
)
|
:fa-brands-github: Show source on GitHub