我有一张像这样的桌子:
colA | colB
" " | 1
"K 111" | 1
"K222" | 2
" " | 3
有些列只有一个空格(“”),有些列有“K {number}”,有些列有“K{number}”。
如果 colA 有空格,我希望将该值替换为 colB 中的值。
所以最终结果应该是:
colA | colB
1 | 1
"K abc" | 1
"Kdef" | 2
3 | 3
我怎样才能做到这一点?