replace an item of a column based on another column

Solution for replace an item of a column based on another column
is Given Below:

I’m trying to replace an item of a column, based on the data of another column, as the following code:

import pandas as pd
import numpy as np
data = np.array([['3S', 12345],['-2', 12345], ['4S', 12334], ['-2', 12334]])
df = pd.DataFrame(data, columns=['col_1', 'col_2'])
df

#I'd like to find the item "-2" at col_1 and replace it based on the data of the col_2. As result, i'd like to have a dataframe like this:

data = np.array([['3S', 12345],['3S', 12345], ['4S', 12334], ['4S', 12334]])
df = pd.DataFrame(data, columns=['col_1', 'col_2'])
df

Let us try

df.col_1 = df.col_1.mask(df.col_1.isin(['-2'])).
              groupby(df['col_2']).transform('first')
df
Out[50]: 
  col_1  col_2
0    3S  12345
1    3S  12345
2    4S  12334
3    4S  12334