extract_datetime_parts
Extract datetime components like year, month, dayofweek, and is_weekend into new columns for feature engineering, preserving the original column.
Instructions
Extract datetime components as new columns ({column}_year, {column}_month, etc.). Parts: year, month, day, dayofweek, hour, minute, weekofyear, quarter, is_weekend. Use early in feature engineering when datetime columns exist. year, month, dayofweek, is_weekend are often highly predictive. Original column is preserved. Example: extract_datetime_parts(column="date", parts=["year", "month", "dayofweek", "is_weekend"])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parts | No | ||
| column | Yes | ||
| df_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |