Shift / Manipulation Layer
Shift values up or down within a column by a specified number of rows. Similar to pandas' shift() or R's lag()/lead().
Examples: Original: [1,2,3,4,5] Shift +2: [null,null,1,2,3] (shift down) Shift -2: [3,4,5,null,null] (shift up)
Common applications:
- Time series lag analysis
- Change detection (current vs. previous)
- Lead/lag relationships
- Sequential pattern analysis
- Moving window calculations
- Before/after comparisons
- Trend identification
- Offset calculations
Note: Shifted-out values are lost; new positions filled with null values.
Table
0
0
Table
Select
columnColumn to shift. Common scenarios:
- Sequential measurements for comparison
- Time-ordered values for lag analysis
- Ordered metrics for trend calculation
- Series data for pattern detection
- Periodic data for cycle analysis
ShiftBy
i32Number of positions to shift. Direction:
- Positive: Shift down (future values) Example: +1 for next period
- Negative: Shift up (past values) Example: -1 for previous period
Common uses:
- ±1 for adjacent comparison
- ±7 for weekly patterns
- ±12 for monthly cycles
- ±4 for quarterly analysis
AsColumn
nameName for the new column. If not provided, the system generates a unique name. If AsColumn
matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.