Let’s say I have the following pandas dataframe:
I would like to create a new column with the value of ColB and -1 * ColB. The resulting dataframe should look like this:
How can I achieve this efficiently?
>Solution :
simple way:
df['ColC'] = df['ColB'].astype(str) + ", " + (df['ColB']*-1).astype(str)

