ffill#
- swordfish.function.ffill()#
If obj is a vector, forward fill the null values in obj with the previous non-null value.
If obj is an array vector:
For an empty row, fill it with the nearest non-empty row that precedes it.
For null values in a column, fill them with the nearest non-null value that precedes it within the same column.
If obj is a matrix or a table, forward fill the null values in each column of obj according to the above rules.
This operation creates a new vector and does not change the input vector. Function ffill changes the input vector.
Note
The only difference between ffill and ffill is that the latter assigns the result to obj and thus changing the value of obj after the execution.