给定如下数据数据
Time Col01 Col02
05:17:55.703000 NaN NaN
05:17:55.703000 891 12
05:17:55.703000 891 13
05:17:55.703000 891 15
05:17:55.703000 891 16
05:17:55.703000 891 17
05:17:55.703000 891 18
05:17:55.707000 892 0
05:17:55.707000 892 1
05:17:55.707000 892 5
05:17:55.707000 892 6
05:17:55.707000 892 7
05:17:55.708000 NaN NaN
05:17:55.711000 892 10
05:17:55.711000 892 11
05:17:55.711000 892 12
05:17:55.723000 893 11
05:17:55.723000 893 15
05:17:55.723000 893 16
05:17:55.726000 NaN NaN
NaN如果当前 col基于以下逻辑,则需要创建两个新的 cols
+-----------------+-------+-------+----------+----------+----------------------------------------+
| Time | Col01 | Col02 | Col01new | Col02new | |
+-----------------+-------+-------+----------+----------+----------------------------------------+
| 05:17:55.703000 | NaN | NaN | 891 | 12 | if NaN & first row, fill from next row |
| 05:17:55.703000 | 891 | 12 | 891 | 12 | |
| 05:17:55.703000 | 891 | 13 | 891 | 13 | |
| 05:17:55.703000 | 891 | 15 | 891 | 15 | |
| 05:17:55.703000 | 891 | 16 | 891 | 16 | |
| 05:17:55.703000 | 891 | 17 | 891 | 17 | |
| 05:17:55.703000 | 891 | 18 | 891 | 18 | |
| 05:17:55.707000 | 892 | 0 | 892 | 0 | |
+-----------------+-------+-------+----------+----------+----------------------------------------+
红颜莎娜
ibeautiful
相关分类