import numpy as np import pandas as pd df['YourColumn'] = df['TanhResult'].apply(lambda x: np.tanh(x))