There is missing value in my data.
I'm trying to create script for new column 'Row Number' to get row number of lagged value of Col1(non-missing data).
I'm facing problem when missing data is encountered.
Below is my data with required row number outcome.
How to create script for this?
Row# | Col1 | Row Number(outcome) |
1 | 11 | |
2 | 18 | 1 |
3 | 34 | 2 |
4 | | 3 |
5 | | 3 |
6 | | 3 |
7 | 20 | 3 |
8 | | 7 |
9 | | 7 |
10 | 24 | 7 |
11 | 14 | 10 |
12 | 17 | 11 |
13 | | 12 |
14 | | 12 |
15 | 16 | 12 |
16 | 25 | 15 |