How can I display the actual value of column if the result of the isnumeric
= False
and fill
the NaN
based on the SKU
DF
SKU SKU2
SKU_ABC False
0 NaN
0 NaN
0 NaN
SKU_ACD False
0 NaN
0 NaN
Expected result
SKU SKU2
SKU_ABC SKU_ABC
0 SKU_ABC
0 SKU_ABC
0 SKU_ABC
SKU_ACD SKU_ACD
0 SKU_ACD
0 SKU_ACD
Script (only displayed True/False)
df2['SKU2'] = df2['SKU'].str.isnumeric()
I tried this one
df2['SKU2'] = df[~df2['SKU'].str.isnumeric()]
but I got this error
TypeError: bad operand type for unary ~: 'float'