0
def copy_blanks(df, column):
like this, Please suggest me.
Input:
e-mail,number
[email protected],0
[email protected],1
[email protected],0
[email protected],0
[email protected],1
[email protected],0
,0
ただし、ここではdefault_valueオプションを使用しています。その点で我々はあらゆる価値を使用することができる。このオプションを使用したとき。その値は下に追加されますcopy_blanks(df、column)は、元の列がブランクのすべての値の元の列の値を最後の列にコピーする必要があります。
e-mail,number
[email protected],0
[email protected],1
[email protected],0
[email protected],0
[email protected],1
[email protected],0
NA,0
しかし、私の出力にはデフォルト値とskip_blankオプションがあります。 trueのようにskip_blankを使用するときは、デフォルト値を使用しないでください。skip_blankをfalseにしておくと、デフォルト値が使用されます。
私の出力:私が正しくあなたを理解していれば
e-mail,number,e-mail_clean
[email protected],0,[email protected]
[email protected],1,[email protected]
[email protected],0,[email protected]
[email protected],0,[email protected]
[email protected],1,[email protected]
[email protected],0,[email protected]
,0,