You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a column of values, I want to create a column containing the values of this column from the previous row.
test
A
B
C
D
I press w, and input 1 0 to create a column with 1 previous value, and 0 subsequent values:
I now create a new column with the previous values using =test_window[0]:
This yields exactly what I want, except in the first row.
Rather than the previous (NULL) value, I get the value of the current row:
Expected result
I expect the window list to always contain 2 values, and be padded with None when the previous value does not exist, such as for the first window record. This might look like the following:
Small description
Given a column of values, I want to create a column containing the values of this column from the previous row.
I press
w
, and input1 0
to create a column with 1 previous value, and 0 subsequent values:I now create a new column with the previous values using
=test_window[0]
:This yields exactly what I want, except in the first row.
Rather than the previous (
NULL
) value, I get the value of the current row:Expected result
I expect the window list to always contain 2 values, and be padded with
None
when the previous value does not exist, such as for the first window record. This might look like the following:Steps to reproduce with sample data and a .vd
test-window.zip
Additional context
Please include the version of VisiData and Python.
saul.pw/VisiData v3.0.1
Python 3.10.12
The text was updated successfully, but these errors were encountered: