cycquery.ops.ExtractTimestampComponent¶
- class ExtractTimestampComponent(timestamp_col, extract_str, label)[source]¶
Bases:
QueryOp
Extract a component such as year or month from a timestamp column.
- Parameters:
Examples
>>> ExtractTimestampComponent("col1", "year", "year")(table) >>> ExtractTimestampComponent("col1", "month", "month")(table)
Initialize the operation.
Methods