Log transformation is given by the formula code example
Example: log transformation
# dataframe: df
# feature with outliers: price
# Apply Log Transformation:
df['price'] = np.log(df['price'])
# dataframe: df
# feature with outliers: price
# Apply Log Transformation:
df['price'] = np.log(df['price'])