# Why does not log transformation make the data normalized?

Having some skewed features as shown in the following figure. I am trying to imply log transformation to the feature called vBMD(mgHA/cm3). I run the following codes

import numpy as np

import pandas as pd

from sklearn.preprocessing import MinMaxScaler

scaler=MinMaxScaler(feature_range=(0,1))

df['vBMD (mgHA/cm3)']=scaler.fit_transform(np.array(df['vBMD (mgHA/cm3)']).reshape(-1,1))

df['vBMD (mgHA/cm3)']=np.log(np.array(df['vBMD (mgHA/cm3)']))

After the transfromation, I have got the following result.

While I am waiting that the feature will be normalized, its skewness increased. Thus, what am I doing wrong?

• Thanks a lot. I figure out the main idea. In my case, to make mentioned feature normalize, can I use QuantileTransformer such as quantile_transformer = QuantileTransformer(output_distribution='normal', random_state=0) df['vBMD (mgHA/cm3)'] = quantile_transformer.fit_transform(np.array(df['vBMD (mgHA/cm3)']).reshape(-1,1)) – Ram Mar 6 at 11:57